View Single Post
  #7   Spotlight this post!  
Unread 24-03-2008, 13:42
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 470
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: Parity on the RC controller

Quote:
Originally Posted by Ken Streeter View Post
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.
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
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"