Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
01/24/12 14:28
Read: times


 
#185650 - Uart memory mashup
HI all,
I have written some code that uses ORL to mix 2 bit messages together with shifting. I CALL GETVAL from UARTIO.asm and insure that the value left in the ACC is less than 0x04.
So I end up with 2 bit words like so
00000011, 00000001, 00000010, 00000000

I shift new values and ORL them to mix leaving me with a message like

00110100
This equals a message 1 4 2 1
In the code that I am trying to produce

The problem is!!!
When I have this number in A and I MOV MUX_DATA_1, A and also MOV SBUF, A I get (00110100) on Hterm
When I load that number again from its register (MUX_DATA_1) and send to SBUF I get (00110000) on Hterm

Where did my second bit go? Why does my Uart/MUX_DATA_1 lose bits???

Here is my Uart set up:
T3CON, #85h
T3FD, #2Dh
PCON, #80h
SCON, #52h
TMOD, #12h

The bit rate is meant to be 9600bps but somehow ended up at 2400bps
However this should not affect the flow of the program since my terminal emulator can be set to 2400bps

Anyone have any ideas?


List of 3 messages in thread
TopicAuthorDate
Uart memory mashup            01/01/70 00:00      
   nobody can comment on this ....            01/01/70 00:00      
   Post properly            01/01/70 00:00      

Back to Subject List