Is it posible to set the parity to even on the RC?
Can you be a little more specific about what you’re talking about? Parity is something I usually associate with error-detecting memory. The IFI Robot Controller has none of that.
I’m going to speculate that you may be seeking to change the serial port settings for the programming port on the IFI Robot Controller. If that is the case, I am not personally aware of any way to change the serial port parameters for the programming port from the default values:
Bits per second: 115200
Data bits: 8
Parity: None
Stop bits: 1
Flow control: None
However, if you can use the 2nd serial port (the TTL-level serial port on the RC) I know that you can adjust the baud rate of the port; it may be possible to adjust the parity settings, but I do not recall having seen those settings in Kevin Watson’s serial port code.
If you do find a way to do so, please post here to let us know!
Thanks!
I just did a quick search in the PIC18F8722 (the microcontroller in the RC) data sheet to check the specs on the serial port. I learned that the Enhanced Universal Synchronous Asynchronous Receiver Transmitter (EUSART) on the microcontroller does not support a parity bit in hardware, although one could implement parity functionality in software.
Thus, if you really need to have parity added to the RC serial ports, this would need to be added in your software.
Then again, maybe somebody out there has already written the code needed to add serial port parity calculations / processing to Kevin’s serial port driver? If so, I wouldn’t be surprised if he’d be willing to add it to the master version of his code if it is sent to him for that purpose.
Thank you for the replies.
I am trying to change the parity on the TTL port.
I am sure I need to change parity in order to do what i need to do. If you want I can upload the serial API that I wrote for the laptop that I am using to communicate to the RC(through an IR). [Tested the parity with Hyper Terminal communicating through the same IR but this time from the laptop to a PC, only even parity works].
EDIT: I was able to get the RC and laptop to sent signals, just with a problem the RC was giving a error value(255) . [It printed “other Data” only at start and shut down of the RC (on IFI Loader terminal), I made it print the “other Data” as an integer which was 255]
Hey, I am back.
Anyone can help me ith this?
I think I need to “BUMP” this post to the active topics again, I am sry for triple post but i need an answer.
Ken Streeter already answered you: there is no hardware support for parity on the serial communication ports on the PIC18F8722 used in the Robot Controller.
You said you wrote a “serial API”. Can’t you change it so that it doesn’t require an extra parity bit?
Thanks for the clarification that you are indeed using the TTL Serial Port. Just to add a bit more information to my prior post…
As I mentioned earlier, this serial port does not natively support parity calculations. I’d suggest you take a look at the PIC18F8722 Data Sheet (from the Microchip web site.) Section 20.2 says that “Parity is not supported by the hardware, but can be implemented in software and stored as the 9th data bit.”
If you would like to add parity calculations to Kevin’s serial port code, it could probably be done without too much hassle, but would need to be implemented in software. Pages 250 and 251 of the PIC18F8722 data sheet describe the register bit settings that would need to be changed to have the serial port expect the 9th data bit (for parity).
Best regards,
–ken
I did try setting parity to none but then that caused the IR not to communicate with anything at all, even with the hyper terminal on the PC. So I figured it will work only with parity set to even.
Thank you, I didn’t know that data sheet ever existed (mainly cause I didn’t search for it),I think what you told me and what the data sheet explains will help me code.