??? 04/22/05 11:11 Read: times |
#92137 - F.A.O Rob Responding to: ???'s previous message |
Hi Rob,
I took your advice and made the following changes to the sequence ?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,P2 ; Read least significant nibble on port2 and store it in Rx_data by ORL A,#0F0H ; moving the port value into the ACC, then masking off the value of the ANL A,P2 ; control lines, so you're left with just the data. MOV Rx_data,A ?WHILE7: JNB RXR,?WHILE7 ; Wait for RX-Request high to tell host data ; is present SETB RXA ; Force RX-Accept back to high to acknowledge ; that data has been read ; Repeat steps for higher 4-bit ?WHILE8: JB RXR,?WHILE8 ; Wait for RX-Request to go low, transfer request from SP2 CLR RXA ; Force RX-Accept to go low MOV A,P2 ANL A,#00FH ; Read least significant nibble on port2 and store it in Rx_data by ORL A,#0F0H ; moving the port value into the ACC, then masking off the value of the ANL A,P2 ; control lines, so you're left with just the data. ADD A,Rx_Data ; Add high nibble to Rx_Data ?WHILE9: JNB RXR,?WHILE9 ; Wait for RX-Request high to tell host data ; is present SETB RXA ; Force RX-Accept back to high to acknowledge ; that data has been read END I went through the code by hand by noting the relative accumulator, port & register values. I am testing it by sending AAh but when i go through this receive sequence i am not gettin 10101010 in Rx_Data. Any suggestions where i could be goin wrong. 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 |