Pesticida
- 25th June 2005, 13:02
Hi,I'm new here,
My Englisch is not very good but i try to write some questions?Sorry.:-)
I have a problem I want to write a code in PicBasicpro that send data to RS232.
I use Pic16F870 PortC.6 TX and PortC.7 RX.
Example:
DEFINE OSC 4
DEFINE HSER_RCSTA 90H ' Set receive status and control
DEFINE HSER_TXSTA 20H ' Set transmit status and control
Define HSER_BAUD 9600
INPUTdata VAR WORD
START:
PAUSE 1
HSEROUT ["ENTER A DECIMAL NUMBER BETWEEN 0 65535" ,10,13]
But the problem is I become on other software in Visual Basic on the PC this string: ิ ม`ฤลอม ฮย ย ิื ฮ`p `v5us5
and another example is when i want from pc to send data to pic and back i receive just a one character .
I send Tony end come back to PC just T.
Example:
loop:
Serin PORTC.7, T2400, ReadIn
Serout PORTC.6,T2400,[ReadIn,10,13]
goto loop
I have search in internet and in PicBasicPro handbook but is no good explanation.
Thanks pesticida
My Englisch is not very good but i try to write some questions?Sorry.:-)
I have a problem I want to write a code in PicBasicpro that send data to RS232.
I use Pic16F870 PortC.6 TX and PortC.7 RX.
Example:
DEFINE OSC 4
DEFINE HSER_RCSTA 90H ' Set receive status and control
DEFINE HSER_TXSTA 20H ' Set transmit status and control
Define HSER_BAUD 9600
INPUTdata VAR WORD
START:
PAUSE 1
HSEROUT ["ENTER A DECIMAL NUMBER BETWEEN 0 65535" ,10,13]
But the problem is I become on other software in Visual Basic on the PC this string: ิ ม`ฤลอม ฮย ย ิื ฮ`p `v5us5
and another example is when i want from pc to send data to pic and back i receive just a one character .
I send Tony end come back to PC just T.
Example:
loop:
Serin PORTC.7, T2400, ReadIn
Serout PORTC.6,T2400,[ReadIn,10,13]
goto loop
I have search in internet and in PicBasicPro handbook but is no good explanation.
Thanks pesticida