OEM BS_SX with 20MHZ Or 50MHZ
Sutton Murray
Posts: 88
I have recently build a circuit using the OEM BS_SX 'http://www.parallax.com/detail.asp?product_id=PBASIC2SX/P'.
The schematics for this IC stated to use a 50 MHZ resonator.
After soldering all items to the board, i got stuck, i didn't had a 50 MHZ resonator with me. Having a 20MHZ on hand, i fitted it hoping i could start up the circuit.
The stamp editor came up showing the circuit as a BS2e module. All seems functional ling correct. Is this the only difference between the BS2e and The BS2_sx, the clock speed? Will i have any trouble with the circuit module as is fitted with the 20MHZ resonator in the future.
The schematics for this IC stated to use a 50 MHZ resonator.
After soldering all items to the board, i got stuck, i didn't had a 50 MHZ resonator with me. Having a 20MHZ on hand, i fitted it hoping i could start up the circuit.
The stamp editor came up showing the circuit as a BS2e module. All seems functional ling correct. Is this the only difference between the BS2e and The BS2_sx, the clock speed? Will i have any trouble with the circuit module as is fitted with the 20MHZ resonator in the future.
Comments
No, there are many differences between those two platforms, and it's mainly in the hardware architecture. You will probably find that the internal timing of the instructions is way off, and it would be very difficult, if not impossible, to do any serial communications with it.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Calculating the baudmode for SEROUT may be a very difficult proposition. Numerous PBASIC commands depend on the speed of the processor for proper usage. All I'm saying is that you'd have to do a bit of re-calculatig I'd think. The data given in the PBASIC Manual and PBASIC Help File is based on having the proper resonator in place.
Regards,
Bruce Bates
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
I guess it will be the easiest just fitting the correct resonator.
It's just hard siting around only aloud to look at your project that you have spend weeks on to complete. That, just because of one only small part.
Where i live you aren't gone buy any resonators on a weekend.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- Rick
Thus, even though the BS2 'plain' uses a 20 MHz resonator, that doesn't mean the BS2sx will give you correct baud rates if you replace its 50 Mhz with a 20 Mhz resonator.
Another idea - since the Stamp Editor identifies it as a BS2e, there might be some editor-side routine that can detect the oscillator rate of the Stamp that's connected and adjust the values for time-sensitive instructions accordingly, before programming the Stamp. This would make sense why it would need to identify it as a BS2e instead of a BS2sx.
I was ordering some OEM BS2e and BS2sx chips, and decided to call up the tech support (the guy I talked to was great, btw) and ask what the difference was. He concluded that there isn't any difference, other than the ordering part number and the frequency of the resonator to be used. So, I ordered both anyway. Guess what! They came in the same piece of antistatic foam - and there's no way to tell them apart! So I guess I will be finding out for myself before too long.
I recently ordered some BS2e and BS2sx interpreter chips from Parallax. They came in the same package, and other than the two different date codes there was no way to tell them apart visually.
However, I wired them up in a circuit, and swapped crystals in and out. There *IS* a difference - but it is slight.
-The BS2e and BS2sx interpreter will both run the same code (that is tokenized for a BS2e) with a 20MHz resonator correctly. HOWEVER, the Stamp Editor will not properly ID the circuit with a BS2sx interpreter. Strangely, though, DEBUG commands work correctly, possibly other timing-sensitive commands as well.
-The BS2sx interpreter would not be properly identified until I ran it at 50MHz. Running the code for a BS2e (I had not reprogrammed the EEPROM yet) resulted in DEBUG commands looking like garbage. As soon as I changed the STAMP directive to BS2sx, and reprogrammed the EEPROM, it was fine.
From this information I can gather a few things.
-The timing-sensitive commands probably contain their timing information in the tokens downloaded to the EEPROM. So when you execute FREQOUT 1000 on a BS2 or BS2e, the token has some value that is specific to an interpreter running at 20MHz; for a BS2sx, the timing information in the token is different (probably has a timing value that is 2.5 times larger to account for the frequency difference).
-The identification routine in the Stamp Editor relies on both some information that is hard-programmed into the interpreter chip, as well as the actual timing of the interpreter chip.
-Parallax should include better labelling of their parts when they package them to ship to you! Maybe use a different color of paint to dot the chips with....
The verdict: Don't waist your time with modifications just keep to the original.