PDA

View Full Version : 16F628 without Max232



SuB-ZeRo
- 16th June 2005, 22:08
hello i am trying to send "hello" without Max232 IC , i am getting characters like this
*ë©::
*ë©::
*ë©::
*ë©::
*ë©::
i am useing 16F628 with 4 MHz Xt
and the codes re

RCSTA=$90
TXSTA=$25
SPBRG=103
loop:
hserout ["hello",13,10]
pause 500
goto loop
end

am i making a mistake?

mister_e
- 16th June 2005, 22:15
if you don't se any inverter like MAX232, you can't use HSEROUT. you'll need to use SEROUT or SEROUT2 and set it to XYZbaudrate AND Inverted mode.

If you plan to send data to your PC without any Max232, better if you, of course, use a current limiting resistor between PIC and PC AND make sure the Serpin is set to high level before sending the first data. This will avoid to have odd result on the first sent character.

DynamoBen
- 16th June 2005, 22:30
The other option is to use the DEBUG command. Its very similar in command struction to Hserin/Hserout. Hserout or Hserin will require a MAX232.

SuB-ZeRo
- 17th June 2005, 00:00
Yesssssss
When i change the codes like this it works :)

include "modedefs.bas"
loop:
serout portb.2,4,["hello"]
pause 500
goto loop
end

Thanks all of u for help