PISO operation

Discussion in 'Embedded Systems and Microcontrollers' started by bas, Apr 11, 2008.

Thread Status:
Not open for further replies.
  1. bas

    Thread Starter New Member

    Apr 11, 2008

    Our requirement is for the AT89C2051 to take in data in parallel and send it out serially, using serial transmission. Hence the required statements are included to set baud rate at 9600 bps and a crystal oscillator of 11.0592MHz is used. Pin 6, ie P3.2 is connected to StD pin of DTMF decoder 8870. and StD goes high when an output is latched in the decoder. So our program is written to take data from port 1 each time StD goes high. I want to know if any practical considerations have been overlooked in this program which is causing it to not run properly, because it is assembling and simulating fine. Also, so we need to write a code for it to access each bit of data separately from port 1 or what we have written is fine? Please guide us

    org 0000h
    mov tmod,#20h
    mov th1,#-6
    mov scon, #40h
    setb tr1
    mov p1,#0ffh
    again: jb p3.2, l1
    sjmp again
    l1: mov a, p1
    mov sbuf,a
    here: jnb ti,here
    clr ti

    sjmp again

    Thanks in advance
Thread Status:
Not open for further replies.