If I receive a serial byte, then it will be stored as binary. Can I however manipulate it in PICBasic in decimal - for instance if a serial 3 is sent and stored in a byte variable 'input' then the binary stored will be:
00000011
Be sure that the sended "3" is the ASCII 3 and not the character 3 (ASCII $33). In this case you'll be able to do anykind of math you want.
The description makes sense - however, I had a question about how to implement this in PICBasic. For instance, to read from RCREG register (the serial receive register) presumably I just use the HSERIN command? Or can I just read the register directly - so have : my_variable=RCREG
HSERIN will do more than read from the RCREG, it will also set the USART register to get the serial data. Some other will prefer to set manually register setting as when using ADCIN from PBP.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks