-
Pic16f690 Hserin
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?
' 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
-
Which version of PBP are you compiling with?
-
Pic16f690 Hserin
Hello Skymask, Is Pbpro 2.46
-
Pic16f690 Hserin
Hello Skimask, Pbp Version Is 2.46 Thanks In Advance For Your Help.
-
-
Pic16f690 Hserin
Thanks Bruce Yes I Have Already Done, Sorry Everybody But English Is Not Mi Natal Language, The Curious Is With Pic 16f877 And Pic16f627a Work Without Any Changes, Of Course I Select The Apropiate Microcontroller In My Programmer And Microcode Studio.
-
Datasheet page 8. RX pin is also AN11, you should disable it.
Datasheet page 120, table 9-2
ANSELH=0
-
ANSELH=0 should cure that.
-
Pic16f690 Hserin
thanks guys, ANSELH=0 fix the code, now is working. sorry but I AM new to micro programming.
-
;) You're welcome. We all have to begin somewhere, and one day we all had problem like that.
In case of doubt, refer to the following thread
http://www.picbasic.co.uk/forum/showthread.php?t=561
Post #2 have a nice PDF, i suggest you to keep it handy somewhere on your hard drive.
Have fun!