View Single Post
  #2   Spotlight this post!  
Unread 23-02-2009, 15:36
RyanCahoon's Avatar
RyanCahoon RyanCahoon is offline
Disassembling my prior presumptions
FRC #0766 (M-A Bears)
Team Role: Engineer
 
Join Date: Dec 2007
Rookie Year: 2007
Location: Mountain View
Posts: 689
RyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond reputeRyanCahoon has a reputation beyond repute
Re: using ttl on innovation first

I've never used the EDU controllers before, but I have a fair amount of experience with PICs in general and the IFI FRC controller. Someone else may be able to give you a better answer, but here's what I can tell you:

Under the default code (I downloaded the one available on ifirobotics.com), you can use printf(...) to send stuff out on the serial port. If you want to read in from the serial port, try making the following changes:

in ifi_utilities.c: Initialize_Serial_Comms
change USART_RX_INT_OFF to USART_RX_INT_ON

in user_routines_fast.c:InterruptHanderLow
add the following code to the bottom of the function:
if (RXINTF)
{
char data = RCREG;
/* data now holds one received character. it should be placed in a buffer somewhere */
}

Like I said, I haven't tried this code, but it should work. Post back here if it doesn't, or if you need help writing a receive buffer or anything. You also said "[your] code isn't working," so if you already have some code in the works that's having issues, you might try posting it so we can give you suggestions.

Good luck,
--Ryan
__________________
FRC 2046, 2007-2008, Student member
FRC 1708, 2009-2012, College mentor; 2013-2014, Mentor
FRC 766, 2015-, Mentor