Serial comms with RCFast
crgwbr
Posts: 614
I'm using a propeller to communicate with a Python app I wrote for the computer. Everything was going fine (I was using a 5 mhz crystal), then my crystal went bad (I think I hit it with my soldering iron). Anyway, I switched to RCFast mode so I wouldn't have replace the crystal right away, and the Serial Com seemed to stop working. Is there something about the FullDuplexSerial routines that won't work with RCFast?
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Thanks,
Craig
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
NerdMaster
For
Life
To be more specific (for what it's worth):
It really depends on what baud rate you are trying to use and the actual speed of the RC oscillator...·the main thing is that the clock frequency value (the value returned by issuing the Spin CLKFREQ command), or reading location 0 (long) in Main RAM, is written by the application with the "ideal" value of 12,000,000 Hz... but the IRC is actually·running anywhere from 8 MHz to 20 MHz... I've found it to be typically in the 13.4 MHz area.
For a given temperature/voltage, the IRC is fairly stable (though likely different from chip to chip)... ·but it's the fact that the FullDuplex object thinks its running at 12 MHz, when it is actually 13+ Mhz (typically), that's preventing it from timing async serial properly.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
--Jeff Martin
· Sr. Software Engineer
· Parallax, Inc.
maybe a calibration byte sent to the prop at a specified baud rate to get its attention and so it can set its CLKFREQ "register" close enough to work for a packet or two, could be quite useable especially with some sort of checksum for the packet
just a thought stemming from Jeff's post about the relative stability of the RC clock
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Parallax Forums - If you're ready to learn, we're ready to help.