Need help in Mscomm and 8051 coding

Discussion in 'Programmer's Corner' started by kamal01, Jun 2, 2008.

  1. kamal01

    Thread Starter New Member

    Jun 2, 2008
    1
    0
    hello
    i m a using a form in which i m using Mscomm to transfer data from pc to microcontroller. i need a code for mscomm in vb and for microcontroller . can any one give me the code for this. i want to know what code i shoukd write for receving the data from mscomm.
    can any body help me ?

    thanks in advance.
     
  2. Arm_n_Legs

    Active Member

    Mar 7, 2007
    183
    10
    SENDING DATA "A" USING THE MSCOMM OBJECT
    mscomm1.CommPort=1
    mcsomm1.Settings="9600,N,8,1"
    mscomm1.PortOpen=True
    mscomm1.Output="A"

    RECEIVING COMM DATA AT 8051
    wait:
    jnb ri,wait ; wait for receive interrupt flag
    clr ri
    mov a,sbuf ; move received data to accumulator
     
Loading...