Mysterious Failure of a BS2e OEM board.
Martin_H
Posts: 4,051
I was using my new BS2e OEM and decided to debug some of the inputs to debug with this program:
There's a small problem in that I forgot the DEC on two of the outputs. But I now seem unable to upload new programs and I get a stamp not available. If I open the debug window the stamp is still dumping stuff to output and I occasionally see port in use when I try to upload. It is almost like the old program starts so fast after the reset that it prevents the upload of the new one.
Is there anyway out of this bind?
Update: I uploaded a hello world app to a second BS2e board and that worked. So the problem is isolated to this one board.
Update2: Since this EEPROM is removable and I have one left over from building a propeller board can I swap them out? I think this is the one I have from the Propeller board which looks compatible except being twice as big:
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/400/Default.aspx?txtSearch=32k+eeprom
'{$STAMP BS2e} '{$PBASIC 2.5} X VAR Byte Y VAR Byte DO DEBUG "pins = ", DEC IN0, DEC IN1, DEC IN2, DEC IN3, IN4, IN5, CR LOOP
There's a small problem in that I forgot the DEC on two of the outputs. But I now seem unable to upload new programs and I get a stamp not available. If I open the debug window the stamp is still dumping stuff to output and I occasionally see port in use when I try to upload. It is almost like the old program starts so fast after the reset that it prevents the upload of the new one.
Is there anyway out of this bind?
Update: I uploaded a hello world app to a second BS2e board and that worked. So the problem is isolated to this one board.
Update2: Since this EEPROM is removable and I have one left over from building a propeller board can I swap them out? I think this is the one I have from the Propeller board which looks compatible except being twice as big:
http://www.parallax.com/StoreSearchResults/tabid/768/List/0/SortField/4/ProductID/400/Default.aspx?txtSearch=32k+eeprom
Comments
When testing the pins I had them in input state and connected to either 5v or ground with a 220 ohm resistor, so I don't think I damaged the chip. I am really clueless about what is causing this.
Update: Fresh batteries make no difference, but I was using the same batteries on the board that worked.
Update2: I moved the BS2 OEM chip to the other board and I was able to upload a program to it.
So its not the stamp and a change of EEPROM didn't fix it. I doubt it is the crystal because the stamp runs the old program.
Update3: I moved the MAX232 chip from the non-working board to the working board. It works on that board. So that pretty much clears all the major components.
Since Tx and reset use adjacent pins on the MAX232 I looked for solder bridges and didn't see any. I noticed what looked like it might be a cold solder joint, but reheating it didn't help.
I feel like I'm really close. Something I don't understand is this board is using a IRFU5505 http://www.irf.ru/pdf/IRFU5505.pdf which looks like it might be involved in the reset processing, but I'm not sure what it is for.
Update I need to work on my taxes so I have to set this aside. Tomorrow I want to get my wall following example ready to share. So this is back burnered for now. My next step is to burn a new program on the eeprom on the other board. This way I can tell if this is a reset loop versus a failure in reset processing from the MAX232.
I am completely mystified. I went over the board with a fine tooth comb tested voltages and grounds, looked for solder bridges, checked resistances, checked diodes. The EEPROM and MAX232 work in both boards, but the BS2e stopped working both in the old board and the new. Which is a shame because it was working. I'm afraid what ever failure happened to the board killed it.
Using my good board I replaced the program with one that outputs a startup message, pauses, outputs hello world in a loop, then halts. So it wasn't outbound serial communication because I kept getting stamp not available.
The only thing left is assuming a failure of one of the components I can't test. I don't know how to test capacitors, the IRF5505, or the crystal.
If the crystal failed could that break the interpreter?
If I could resolve the problem I'd be willing to buy a new BS2e, but as it is I'm afraid to try because I have no way to fix things.
As a long shot I'll post pictures of the board
If the crystal were broken. the board would be dead ... nothing would work. It's not like the Propeller where it does downloads without a crystal.
Update: I was comparing the board to the BS2e OEM schematic from the Parallax docs. Except for using the MAX232 it was pretty much identical.
This hypothesis makes a fair bit of sense because the unit was unused for a few years. From what I have read electrolytic capacitors depend upon an oxide layer that is replenished by current flowing through the device. When unused this slowly breaks down and can cause problems.
I also have the schematic and will upload it later.
Update: Here's the schematic CBAMB_Sch.pdf and it looks like only the components in the lower right could be involved with the failure. Since the MAX232, the resistors, and the diode all check out, it can only be the 1 uF capacitors.
It's a shame that this somehow damaged the BS2e, but stuff happens. So I am going to replace the capacitors and verify that corrects the voltage problem. If so I will try the working BS2e in the hopefully fixed board. If it works I am going to make lemonade from these lemons by converting the board to a BS2sx which it also supports.
Mike Green and Mike Davey, thanks for your help as I was definitely lost on this one.
Erco, a generous offer, but my son's scout pack has an awards dinner that conflicts with the Expo. Plus there's a six hour flight each way which is a bit of a disincentive.