Go to Post If there's one thing that I love, it's a good scouting challenge! - wilhitern1 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-03-2008, 13:43
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: 469
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
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.
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.
__________________
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!"
  #2   Spotlight this post!  
Unread 17-03-2008, 14:20
FIRSTMa2104's Avatar
FIRSTMa2104 FIRSTMa2104 is offline
Registered User
FRC #2104 (Colonel Robotics)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Worcester, Ma
Posts: 20
FIRSTMa2104 is on a distinguished road
Re: Parity on the RC controller

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]
__________________

Last edited by FIRSTMa2104 : 17-03-2008 at 15:03.
  #3   Spotlight this post!  
Unread 19-03-2008, 07:55
FIRSTMa2104's Avatar
FIRSTMa2104 FIRSTMa2104 is offline
Registered User
FRC #2104 (Colonel Robotics)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Worcester, Ma
Posts: 20
FIRSTMa2104 is on a distinguished road
Re: Parity on the RC controller

Hey, I am back.

Anyone can help me ith this?
__________________
  #4   Spotlight this post!  
Unread 24-03-2008, 10:54
FIRSTMa2104's Avatar
FIRSTMa2104 FIRSTMa2104 is offline
Registered User
FRC #2104 (Colonel Robotics)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Worcester, Ma
Posts: 20
FIRSTMa2104 is on a distinguished road
Re: Parity on the RC controller

I think I need to "BUMP" this post to the active topics again, I am sry for triple post but i need an answer.
__________________
  #5   Spotlight this post!  
Unread 24-03-2008, 13:28
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Parity on the RC controller

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?
  #6   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: 469
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!"
  #7   Spotlight this post!  
Unread 27-03-2008, 00:13
FIRSTMa2104's Avatar
FIRSTMa2104 FIRSTMa2104 is offline
Registered User
FRC #2104 (Colonel Robotics)
Team Role: Programmer
 
Join Date: Feb 2007
Rookie Year: 2007
Location: Worcester, Ma
Posts: 20
FIRSTMa2104 is on a distinguished road
Re: Parity on the RC controller

Quote:
Originally Posted by Alan Anderson View Post
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?
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.

Quote:
Originally Posted by Ken Streeter View Post
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
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.
__________________
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How the heck do you use an XBOX360 controller with the chicklet?? waialua359 Control System 58 17-02-2008 12:43
Programming The CMUcam for the Vex controller 987HighRoller Programming 3 24-06-2006 15:27
communication between the robot controller and the interface Shlomi32 General Forum 4 05-12-2005 16:53
Can the pic controller send the data to pc? sunnyrx7turbo Control System 2 05-08-2005 13:14


All times are GMT -5. The time now is 21:08.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi