Ioannis, Obviously none of you are reading the data sheets for the processors you are trying to program... Set RCSTA.7 to 0 and the port is all yours...
Dave Purola,
N8NTA
Ioannis, Obviously none of you are reading the data sheets for the processors you are trying to program... Set RCSTA.7 to 0 and the port is all yours...
Dave Purola,
N8NTA
Thanks all. It is weird that it will not work setting the SPEN to 0. I did try it and did not get any positive result. If anyone can try it on its own I'd be obliged.
Ioannis
What!!! Read the data sheet!!! That is just asking tooo much
Anywho, that is why I suggested
TXSTA = %00000000
being we are dealing with the transmit part/pin..
bit 5 is all that, I thought, needed set to zero.
Ioannis,
When I get home this weekend I am going to play with this.
Dave
Always wear safety glasses while programming.
Thanks Dave. It is not in TXSTA but in RCSTA, bit 7 where the UART is enabled/disaled. But as I stated before, once it is enebled and there are even 1 Hserout command somewhere in the program, I cannot gain control of the port pin. May be I got a defective chip, maybe there is a ghost around. I cannot explain it.
Before posting usually the manual/data sheet is really dusted good. In vein...
I will try tomorrow with different system (MCU/PC/Programs).
Ioannis
I am a little embarrased. I feel like Goofy. Anyway. The problem was the Decimal/Hexadeciml numbers I got confussed.
Mister-e has involved to this! His utility shows the numbers in Decimal, while the copy variables has a mix of decimal/hex numbers.
All is working OK now. Sorry for the lost time.
Ioannis
P.S. I Attache the test code for On the fly Baud Rate changing.
Me too.
To switch from hardware to software
Code:'# 16F877A DEFINE OSC 20 X VAR BYTE START:X = X + 1 HIGH PORTD.2 :PAUSE 250:LOW PORTD.2:PAUSE 250' HEARTBEAT RCSTA=$90:TXSTA=$24:SPBRG=129:HSEROUT ["HSER ",DEC X,13,10] PAUSE 250:RCSTA=$0:SEROUT2 PORTC.6,84,["SER ",DEC X,13,10] GOTO START
Dave
Always wear safety glasses while programming.
Bookmarks