Hi Everyone, Actually RB1 & RB2 are the hardware pins in a '628 :) Also check that the USART hasn't detected a farming or overrun error and stopped receiving.. Can't remember off hand if this shuts down the receiver, but I have a feeling that it does. Also, you set the pins to outputs/inputs as required, I can't remember which what the are supposed to be setup.. Cheers, Ash. --- Ashley Roll Digital Nemesis Pty Ltd www.digitalnemesis.com Mobile: +61 (0)417 705 718 > -----Original Message----- > From: pic microcontroller discussion list > [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of dr. Imre Bartfai > Sent: Wednesday, 6 February 2002 7:51 PM > To: PICLIST@MITVMA.MIT.EDU > Subject: Re: [PIC]: CCS compilers??? Was: C Compilers, the sequal > > > Hi, > > I guess here is a misunderstanding. IMHO #int_rda makes sense > ONLY if the > pins assigned in the #USE statement are the dedicated h/w > ones (RC6 and > RC7). > > I hope this helps. > > Imre > > On Tue, 5 Feb 2002, Kevin A. Benedict wrote: > > > Hi Tommi, > > I have CCS C PCM ver 2.7, and have been unable to get RX int rtn to > > work at all, I tried your code line: > > #device PIC16F628 > > #case > > #include "C:\PROJECTS\defs\16f628.h" > > #include "C:\PROJECTS\defs\defs_628.h" > > #fuses xt,nowdt,noprotect,put,nobrownout,nolvp > > #use delay (clock=4000000) > > #use rs232 (baud=9600, rcv=PB1, xmit=PB2, parity=N, bits=8,ERRORS) > > //#ZERO_RAM > > > > #INT_RDA > > void serial_isr(){ > > char char_received; > > char_received = RCREG; // (direct from receiver) > > // c=getc(); > > putc(char_received); > > } > > void flashled(); > > main () > > { > > enable_interrupts(GLOBAL); > > enable_interrupts(INT_RDA); > > > > flashled(); > > puts("\r\n Starting Test ...\r\n"); > > while(1){;} > > } > > > > I dropped the flashled() to save space, see any problems > with this rtn > > it still does not work. I am using a max232 chip, and the > rtn works fine > > without the interrupt rtn. IE getc() then putc(). So far > CCS has been > > unresponsive. > > > > >One of my problems was using getc() function in RX > interrupt routine. My > > >interrupt routine did not work until for a _long_ > debugging and until I > > >replaced getc() with something like. > > > > > >char_received = RCREG // (direct from receiver) > > > > > >I changed only one line. > > > > -- > > http://www.piclist.com hint: To leave the PICList > > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > > > > > -- > http://www.piclist.com hint: PICList Posts must start with ONE topic: > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > -- http://www.piclist.com hint: PICList Posts must start with ONE topic: [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads