Skip to main content

Messages

This section allows you to view all Messages made by this member. Note that you can only see Messages made in areas you currently have access to.

Messages - megabug

17
Bus Pirate Support / Re: BPv4 free pcb build and some problems.
CS OK


:) Okay, I could have thought of this on my own... Well, it's fine now.

Oh and with I2C i get a lot of "Syntax error at char X" when trying to use it. Should this work?


Thanks!

(Oh and again thanks for the free pcb, Ian)
18
Bus Pirate Support / [SOLVED]BPv4 free pcb build and some problems.
Hi folks,

I finally had a little bit time to finish my BPv4 and stumbled upon some problems.

The newest firmware works, but the bootloader doesn't. The BP doesn't enumerate with the bootloader. I tried to compile it myself but no change.

The hardware is somewhat strange, I have troubles.

First, the firmware info isn't correct yet (version)
HiZ>i
Bus Pirate v4
Firmware v6.0-a1 (r1400)
DEVID:0x1019 REVID:0x0003 (24FJ256GB106 A5)
http://dangerousprototypes.com

And my errors from the selftest:
Code: [Select]
HiZ>~
Disconnect any devices
Connect (ADC to +3.3V)
Space to continue
Ctrl
AUX OK
MODE LED OK
PULLUP H OK
PULLUP L OK
VREG OK
EEPROM
SCL OK
SDA OK
WP OK
ACKADC and supply
Vusb(4.91) OK
5V(4.93) OK
5V0 VPU(4.38) FAIL
ADC(3.29) OK
3.3V(3.27) OK
3V3 VPU(2.77) FAIL
Bus high
MOSI OK
CLK OK
MISO OK
CS OK
Bus Hi-Z 0
MOSI OK
CLK OK
MISO OK
CS OK
Bus Hi-Z 1
MOSI OK
CLK OK
MISO OK
CS FAIL
MODE, VREG, and USB LEDs should be on!
Any key to exit
Found 3 errors.

Nevermind the voltages being too low, this is probably because I used different transistors and need to change the base resistor or so. ;) This doesn't bother me.
CS is the problem here. I checked for solder bridges, but everything is ok. CS is connected to the PIC fine. How can I check the components? The CD4066BM is new, somewhere from china. I ordered some on ebay.


The soldering is not my best job, but since I moved here this month I can't find my good solder. ;)
Picture of my build:


Pushbuttons are from a laptop repair I did some months ago, where I had to order 10 and only needed one for the repair. ;) CD4066 is from ebay, and the rest of the components were around. Some are 0805 on 0603 pads, not pretty but works.

Oh and she couldn't find anything either:
19
Project logs / Another TV B Gone with huge range.
Just saw on the blog a tv b gone build and thought I can post mine from last year, which I gave a friend.

Here are my pictures: http://abload.de/gallery.php?key=dXtsyeIo

Maybe this inspires someone to also build it as a gift. :D

Some info: tvbgone firmware from Ian (irtoy) which works like a charm here. 10 IR LEDs from Vishay (some high power stuff afair) in parallel pulsed with up to 4.2V from the battery! I Think the only voltage drop or resistor is in the mosfet I used. ;)

Had to add 2 capacitors in the battery lines so that the pic doesn't crash while transmitting. (Note: the capacitor by the LEDs is NOT connected to the LEDs but before the mosfet.)

The case is a old pvc pipe i found in my garage. I cleaned it and sprayed it (including a high glossy clear paint) so that it looks better. ;)
A simple pushbutton glued from the inside trough a hole is to control the pic.

Battery is a 17670, a slightly slimmer 18650 which is normally in the most laptop battery packs. Glued to the battery is a miniUSB jack with a MAX1811 and a blue LED which indicates charging. While full charged and connected to USB, the blue led flashes when sending IR. Looks really nice ;). This is just because the voltage drop from the IR LEDs.

The IR LEDs get a bit warm when sending for a while, but still work after a couple of months intensive use. :D


Range? A lot! At home I can point it in every direction and my TV goes off. Haven't tried it in a huge shop yet. But could be fun. :)

thanks for reading.
20
Web platform / Re: adding new functions to StackApplications()
Hi,

You don't need to add it into StackApplications()! Just Add it into CustomHTTPApp.c and status.xml.

This way if you put ~pot1~ into your website it will call your HTTPPrint_pot1() in CustomHTTPApp.c.

I have several new functions included in my project and this works just fine!
21
Web platform / Re: SPIFlash instead of EEPROM -> 4MB storage without µSD
I am using my own board, but changed the code to fit the webplatform!

My board is based on an old board from Iam, which was posted on hackaday.com but now with SMD Ethernet jack, dsPIC33FJ and other changes. ;)

Hope it's okay that I used it, Ian. ;)

If someone is interested, board and schematic:

Eagle files: Download

There is a Wifi version coming soon. But it needs to be tested and then I can post it. ;)

There are also some information on my website: http://megabug.de

best regards
22
Web platform / SPIFlash instead of EEPROM -> 4MB storage without µSD
Hi,

Just wanted to share my experience with replacing the EEPROM with an SPIFlash from SST (now Microchip).

I used the SST25VF032B (which you can sample ;)) and these are my changes to the sourcecode:

In main.c replace "XEEInit();" with "SPIFlashInit();"

In CustomHTTPApp.c search for "NVM_VALIDATION_STRUCT" and comment out the whole line.

In HardwareProfile.h at EEPROM setup, comment out the EEPROM defines and put this in:
Code: [Select]
#define SPIFLASH_CS_TRIS		(TRISCbits.TRISC7)
#define SPIFLASH_CS_IO (PORTCbits.RC7)
#define SPIFLASH_SCK_TRIS (TRISCbits.TRISC6)
#define SPIFLASH_SDI_TRIS (TRISBbits.TRISB9)
#define SPIFLASH_SDI_IO (PORTBbits.RB9)
#define SPIFLASH_SDO_TRIS (TRISCbits.TRISC8)
#define SPIFLASH_SPI_IF (IFS2bits.SPI2IF)
#define SPIFLASH_SSPBUF (SPI2BUF)
#define SPIFLASH_SPICON1 (SPI2CON1)
#define SPIFLASH_SPICON1bits (SPI2CON1bits)
#define SPIFLASH_SPICON2 (SPI2CON2)
#define SPIFLASH_SPISTAT (SPI2STAT)
#define SPIFLASH_SPISTATbits (SPI2STATbits)

Thats it.

I prefer using the Flash so I don't need to have a couple of µSD (and I always end up killing them somehow) and now I have enough storage. ;) Don't really need 2GB or so. Hopefully this helps somebody.
23
Web platform / Re: Experience with software I2C?
Ah okay, thanks. Will try it later when I'm home.

Just FYI: TLC59108 is a nice I2C PWM IC! there is also a 16port version of this. Oh and I also made eagle libraries of both chips, so if someone is interested in using it, I can upload the libs.
24
Web platform / Experience with software I2C?
Hi,
Has anyone here used software I2C with the Web platform? I would like to add some GPIOs and other stuff which uses I2C, but cannot use hardware I2C since the data PIN is on one of the EEPROM Pins! (And connot be remapped)

Thanks in advance ;)
25
Web platform / Re: Control your remote outlets (433MHz) with the web platfo
Just an update with the better code, supports now sending 0, float and 1. Uses a char array for transmitting. Only one variable now.

Have fun!

Code: [Select]
#define time1 300
#define time2 900

void send_rf2(char* conf1)
{
int i, j;
j = 0;
for (j=0; j<5; j++){ // repeat sending 5 times. This is needed by the PT2272 receiver
for(i=0; i<12; i++){ // parse data from conf1 and send via RF (left to right)
           
            switch (conf1[i]){   // one bit at a time!
                  case ('F'): {        // send as float
                        RF=1;
                        __delay_us(time1);
                        RF=0;
                        __delay_us(time2);
                        RF=1;
                        __delay_us(time2);
                        RF=0;
                        __delay_us(time1);
                  break;
                  }
                 
                  case ('0'): {        // send as 0
                        RF=1;
                        __delay_us(time1);
                        RF=0;
                        __delay_us(time2);
                        RF=1;
                        __delay_us(time1);
                        RF=0;
                        __delay_us(time2);
                  break;
                  }

                  case ('1'): {        // send as 1
                        RF=1;
                        __delay_us(time2);
                        RF=0;
                        __delay_us(time1);
                        RF=1;
                        __delay_us(time2);
                        RF=0;
                        __delay_us(time1);
                  break;
  }
                 
            }
  }
  RF=1;          // sync
  __delay_us(time1);
  RF=0;
__delay_us(9690);  // weird time, I know...
  }
}
27
Web platform / Re: Use FTDI chip to reset PIC
Just an update from my side: I have been using this for a week now with no problems. :)

Now I wait for my bluetooth module from ebay so I can update my web platform (or my own ethernet boards) via bluetooth. (with reset function!)
29
Web platform / Re: Use FTDI chip to reset PIC
Yes, I normally would use a resistor to connect it to mclr, but since I only have SMD parts I was to lazy to solder wires to my resistors. ;)

To use it you can take a n-channel mosfet to pull mclr to GND and invert DTR in the FTDI Firmware. But I will observe the behavior the next days with the FTDI connected directly.
30
Web platform / Use FTDI chip to reset PIC
Hi,

I was wondering why the web platform can't reset the PIC for entering bootloader automatically with the FTDI chip? I mean I am wondering why this wasn't implemented.

I found a reset tab in the ds30 Loader tool which pulls a pin (RTS or DTR) low for reset when you klick on "Download". So I soldered a wire from DTR (pin 2, FTDI chip) to MCLR and tried it:



Worked fine. Now I don't need to press the reset button when I want to upload a new firmware. (that was annoying while developing stuff)

Tested it with external power, too. Works fine. (I had feared that the FTDI chip somehow resets the PIC when not powered by USB or whatever) The PIC resets when powered by external supply and USB is plugged in, but thats not really a problem.

So if you have a steady hand just solder a wire and be happy. :)
Or: you can reset the PIC by serial command... but that doesn't involve soldering, so it's not that cool. :D

best regards

( ! ) Fatal error: Uncaught exception 'Elk_Exception' with message 'Please try again. If you come back to this error screen, report the error to an administrator.' in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
( ! ) Elk_Exception: Please try again. If you come back to this error screen, report the error to an administrator. in /var/www/dangerousprototypes/forum/sources/database/Db-mysql.class.php on line 696
Call Stack
#TimeMemoryFunctionLocation
10.01612454192session_write_close ( )...(null):0
20.01642585808ElkArte\sources\subs\SessionHandler\DatabaseHandler->write( )...(null):0
30.01642586584Database_MySQL->query( ).../DatabaseHandler.php:119
40.05972725344Database_MySQL->error( ).../Db-mysql.class.php:273