PDA

View Full Version : Pic16f690 Hserin



MARGARITA
- 26th May 2008, 02:01
HI
I'm experiencing a problem with HSERIN command using Pic16F690 a sample PBP code, does not receive any character, but the sending of characters it work fine ( Hello World ).
If I use PIC16F877 OR PIC16F627A the code works fine, any help?
Im use hyper terminal on PC side.

' PicBasic Pro program to send and receive from
' the hardware serial port

DEFINE HSER_BAUD 2400 ' Select the baud rate
char var byte ' Storage for serial character

start:
Hserout ["Hello World", 13, 10] ' Send text followed by carriage return and linefeed

loop:
Hserin 10000, start, [char] ' Get a char from serial port
Hserout [char] ' Send char out serial port
Goto loop ' Do it all over again

End

Bruce
- 26th May 2008, 22:13
Add ANSELH=0 to the top section of your code. P.S. you can get answers without multiple posts on the same subject..;o}