??? 04/21/05 14:16 Read: times |
#92039 - Receive sequence Responding to: ???'s previous message |
I have come up with the following for the receive sequence. There are 3 parts that i am unsure of, these are the two read data parts and the combine nibbles part. I have put them in brackets.
$MOD832 RXA EQU P2.7 ; Output RXR EQU P2.6 ; Input TXA EQU P2.5 ; Input TXR EQU P2.4 ; Output D3 EQU P2.3 ; Bi-Dir D2 EQU P2.2 ; Bi-Dir D1 EQU P2.1 ; Bi-Dir D0 EQU P2.0 ; Bi-Dir ?WHILE6: JB RXR,?WHILE6 ; Wait for RX-Request to go low, transfer request from SP2 CLR RXA ; Force RX-Accept to go low MOV A,Tx_data ; Prepare least significant nibble ORL A,#0F0H ; by placing it on lower 4 lines of port2 ANL P2,A ?WHILE7: JNB RXR,?WHILE7 ; Wait for RX-Request high to tell host data ; is present (ORL A,#0F0H ; Read in data MOV A,Rx_Data) SETB RXA ; Force RX-Accept back to high to acknoledge ; that data hs been read ; Repeat steps for higher 4-bit ?WHILE8: JB RXR,?WHILE8 ; Wait for RX-Request to go low CLR RXA ; Force RX-Accept to go low MOV A,Tx_data ; Prepare least significant nibble ORL A,#0F0H ; by placing it on lower 4 lines of port2 ANL P2,A ?WHILE9: JNB RXR,?WHILE9 ; Wait for RX-Request high to tell host data ; is present (ORL A,#0F0H ; Read in data MOV A,Rx_Data) SETB RXA ; Force RX-Accept back to high to ack ; that data hs been read (SWAP A ) ; Combine nibbles within the accumulator ; in their right order by swapping them END Do you think this would work, espically in regard to the parts that i have my doubts about. Thanks, Declan. |
Topic | Author | Date |
Host to RPC byte transfer | 01/01/70 00:00 | |
leg up | 01/01/70 00:00 | |
RE: leg up | 01/01/70 00:00 | |
You've got to be joking! | 01/01/70 00:00 | |
Receive sequence | 01/01/70 00:00 | |
why not try it | 01/01/70 00:00 | |
Simulate | 01/01/70 00:00 | |
Wrong way round | 01/01/70 00:00 | |
F.A.O Rob | 01/01/70 00:00 | |
On the right track | 01/01/70 00:00 | |
Thanks Rob | 01/01/70 00:00 | |
Resetting port pins![]() | 01/01/70 00:00 | |
F.A.O Rob Klein | 01/01/70 00:00 |