how about
Could you post the whole thing here?Code:HSERIN 10, jump [command, DEC3 SERIALBYTE]
how about
Could you post the whole thing here?Code:HSERIN 10, jump [command, DEC3 SERIALBYTE]
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Hi,
I was just about to make the same sugestion as Steve. But looking at the manual it actually says that if no number follows the DEC modifier it will receive as many digits as it gets. So I'd say it should work as it is (except the missing comma after jump).
Is your X-tal 3.5Mhz or 3.58Mhz? (Can't seem to find a 3.5Mhz so I'm guessing 3.58Mhz). Have you informed PBP of oscillator speed?
And how is the USART baud rate generator setup? With PBP defines or 'manual' ?Code:DEFINE OSC 3 '<---This assumes a 3.58Mhz X-tal
Please, try adding 3 to the DEC modifier as per Steves post and let us know if that helps. If so there seems to be an error in the manual.
/Henrik Olsson.
Last edited by HenrikOlsson; - 12th February 2007 at 19:15. Reason: Spelling...
DEC may work or not, depending how your terminal will send your data. If he send CR+LF, this will screw your data for sure.
i've tried with
And it's working just fine, with terminators (CR+LF) or notCode:Command var byte SerialByte var byte hserout ["---- Ready ----",13,10] Start: while 1 if pir1.5 then hserin 10,jump,[Command, DEC3 SerialByte] gosub ManageBytes endif Jump: wend goto start ManageBytes: hserout ["Command=",Command,_ " SerialByte=", #SerialByte,13,10,13,10] return
depending of your Baudrate, 3.58 MHz may work fine or not. Worth to use the PicMultiCalc to see the error %
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks