A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
|
hi all can the USART of PIC 18f252 transmit only signed char or does it even transmit unsigned char. i am checking the serial communication by sending a few HEX values through the PIC through a MAX232 to my PC,but when i send hex values above 0x80 ie(128 d) i donot get the desired byte on my PC. waiting for an reply anxiously krishna -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web.com/ . |
|
|
|
Check to make sure you are using 8-bit no parity
settings on the USART of both the PC and PIC. I can't speak for the 18F252, as I've
not used it, but the pic's I've used will do 8-bit no parity just fine. If you are
using 7-bit with parity, then you can't do unsigned chars as they won't fit in 7 bits, and
the USART will chop off the 8th bit and replace it with the parity bit.
|
|
|
|
also, check the pc side of things. some serial I/O libraries whack the 8th bit. there is nothing in the PIC USART that precludes 8 bit I/O. --- In , "Bert Drake" <Bert@D...> wrote: > Check to make sure you are using 8-bit no parity settings on the USART of both the PC and PIC. I can't speak for the 18F252, as I've not used it, but the pic's I've used will do 8-bit no parity just fine. If you are using 7-bit with parity, then you can't do unsigned chars as they won't fit in 7 bits, and the USART will chop off the 8th bit and replace it with the parity bit. > ----- Original Message ----- > From: krishnap@m... > To: > Sent: Monday, December 29, 2003 1:37 PM > Subject: [piclist] pic18f252 usart char > hi all > can the USART of PIC 18f252 transmit only signed char or does it even > transmit unsigned char. > i am checking the serial communication by sending a few HEX values through > the PIC through a MAX232 to my PC,but when i send hex values above 0x80 > ie(128 d) i donot get the desired byte on my PC. > waiting for an reply anxiously > > krishna > > ------------------------------------------------------------------ -- > mail2web - Check your email from the web at > http://mail2web.com/ . > > > to unsubscribe, go to http://www.yahoogroups.com and follow the instructions > Yahoo! Groups Sponsor > ADVERTISEMENT > -------------------------------------------------------------------- ---------- > Yahoo! Groups Links > > a.. To |