View previous topic :: View next topic |
Author |
Message |
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 27, 2012 5:45 pm |
|
|
I tested the following program with vs. 4.130 in hardware and it works OK.
(It doesn't work if I specifiy UART1 instead of the pin numbers).
With vs. 4.128, the compiler always generates a software UART
if I specify the pins, or if I specify UART1.
Code: |
#include <16F1823.H>
#fuses INTRC_IO, NOWDT, NOMCLR
#use delay(clock=32M)
#use rs232(baud=9600, xmit=PIN_A0, rcv=PIN_A1, errors)
#int_rda
void rda_isr(void)
{
char c;
c = getc();
putc(c);
}
//========================================
void main()
{
enable_interrupts(INT_RDA);
enable_interrupts(GLOBAL);
while(1);
} |
|
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Tue Mar 27, 2012 5:58 pm |
|
|
I stuck in my output_high(pin_a2); in the INT and its not working. Do I need version 4.130? to use the interrupt? I used your code. SO either my board is whacked or ? was your comms pic to pic that you tested? Thanx for the help.. |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
Posted: Tue Mar 27, 2012 9:37 pm |
|
|
The rs232 was between the 16F1823 and my PC. I used TeraTerm as
the terminal program. The 16F1823 was installed in a Microchip "Low Pin
Count" board. I used a Sparkfun Level Shifter to convert the TTL voltage
levels from the PIC to rs232 levels:
http://www.sparkfun.com/products/449
If you can get vs. 4.130, then it should solve your problem. |
|
|
gpsmikey
Joined: 16 Nov 2010 Posts: 588 Location: Kirkland, WA
|
|
Posted: Tue Mar 27, 2012 9:45 pm |
|
|
Note that according to an email I got today, 4.131 of the compiler is now out.
mikey _________________ mikey
-- you can't have too many gadgets or too much disk space !
old engineering saying: 1+1 = 3 for sufficiently large values of 1 or small values of 3 |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Tue Mar 27, 2012 10:17 pm |
|
|
Bought the update. Mine ran out in Jan. $275 for a bug. If it works then I will be happy. I will post tomorrow the results.
I do wish when you order the updates that you can get them right away instead of waiting for CCS to manually enter stuff. But I digress. |
|
|
curt2go
Joined: 21 Nov 2003 Posts: 200
|
|
Posted: Wed Mar 28, 2012 10:59 am |
|
|
Works good with 4.131.... It was the compiler... But it works so I am very happy.. Thanx for everyones help.. |
|
|
|