View previous topic :: View next topic |
Author |
Message |
Andmo
Joined: 04 May 2015 Posts: 14
|
PIC18F97J94 and INT_RDA |
Posted: Mon May 04, 2015 12:39 am |
|
|
Hello
How can i make a INT_RDA with the PIC18F97J94? This PIC has no Hardware UART on specifed Ports?
#use rs232(baud=9600,parity=N,xmit=PIN_J4,rcv=PIN_J5,bits=8,stream=gps_position,ERRORS)
Danks |
|
![](templates/subSilver/images/spacer.gif) |
drolleman
Joined: 03 Feb 2011 Posts: 116
|
|
Posted: Mon May 04, 2015 12:54 am |
|
|
you need to look at peripheral pin select to assign one of the uarts to the pins you want to use. this chip has 4 of them. ccs has a pretty good documentation on this.
#pin_select U1TX=PIN_C6
#pin_select U1RX=PIN_C7 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah
Joined: 11 Mar 2010 Posts: 19369
|
|
Posted: Mon May 04, 2015 2:59 am |
|
|
Have a look at this thread, for how to setup a relocatable UART.
<http://www.ccsinfo.com/forum/viewtopic.php?t=43290>
Note that you _select_ the pins (as Drolleman points out), but you then don't use the pin numbers in the #USE, but the UART name.
Also, 'beware', depending on chip/compiler version/pins involved, you may need to set the tris. So (for instance), for a chip that requires the TX output to have the tris=0, then you may need 'output_drive(THE_PIN_INVOLVED);'. |
|
![](templates/subSilver/images/spacer.gif) |
|