Quantcast
Channel: MEL PICBASIC Forum
Viewing all articles
Browse latest Browse all 4794

Serial comunication osc 20Mhz and baud 38400 don´t work

$
0
0
Hello

I try hardware serial communication with PIC 18F4520 baudrate 38400 but unfortunatly without sucess
Have anyone sucess with this. What make i wrong?

DEFINE OSC 20

BAUDCON.3 = 1 'SETUP FOR HIGH SPEED.
DEFINE HSER_RCSTA 90H
DEFINE HSER_TXSTA 24H 'HIGH SPEED MODE BAUD RATE GENERATOR
DEFINE HSER_BAUD 38400
DEFINE HSER_SPBRG 38H '38400 BAUD
DEFINE HSER_SPBRGH 01H
Hserout ["DISPLAY"]
'
Have tried this too, but don´t work
DEFINE HSER_RCSTA 90h
DEFINE HSER_TXSTA 24h ;HIGH SPEED BRG SET
DEFINE HSER_SPBRG 110 ;38400 BAUD
DEFINE HSER_CLROERR 1 ;AUTO CLEAR ERRORS
Hserout ["DISPLAY-B"]

Can anyone help?
Thanks in advance
visitac

Viewing all articles
Browse latest Browse all 4794

Latest Images

Trending Articles



Latest Images