Sonsivri

Electronics => Pic Basic Languages => Topic started by: chacacampeon on June 28, 2007, 09:49:45 21:49



Title: I NEED HELP WITH SERIAL 18F4520
Post by: chacacampeon on June 28, 2007, 09:49:45 21:49
THIS IS  THE QUESTION, HOW I CAN ERASE THE RCREG OF 18F4520 USING RPOTON_METAL, I CAN COMMUNICATE WITH ANOTHER PIC, BUT CANT ERASE THIS REGISTER TO RECEIVE OK THE INCOMING DATA.


Title: Re: I NEED HELP WITH SERIAL 18F4520
Post by: raraavis on June 29, 2007, 12:21:59 12:21
Try this,

To Clean RCREG,

Code:
RCREG = 0

Regardess  8)


Title: Re: I NEED HELP WITH SERIAL 18F4520
Post by: chacacampeon on June 29, 2007, 04:03:19 16:03
Thanx, but I prube that.

I also prube this code, that i find in the ASM section:

Code:
asm
         bcf CREN
         movfw RCREG
         movfw RCREG
         movfw RCREG
         bsf CREN

Regards  :'(


Title: Re: I NEED HELP WITH SERIAL 18F4520
Post by: chacacampeon on June 29, 2007, 08:15:56 20:15
 ;)I find the problem, this code dont work:

Code:
hserin [STR String] ' were String is an array of 13 position 

Replaced with:

Code:
for i = 0 to 12
         hserin [Serdata]
         String[i] = Serdata
         next i

PD: hserin [STR String] work OK in 18F252

Regards