Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Serial Communication using MSCOMM

Last post 04-13-2008 8:42 PM by punitxsmart. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 04-13-2008 8:42 PM

    Serial Communication using MSCOMM

    frnds,

    i m interfacing wid a smart card reader (SCR) i made using ATMEGA8. it communicates with pc via UART. when u send a command to the SCR via com port it will give the data stored in smart card in the response. This works in Hyper Terminal. It also works fine when i tested it with mscomm control using MFC.

    I need a stand alone function, say "CString read_from_card()" which should read the data from the card and return the CString. Now the problem is that when I send the command to MSCOMM using the Setoutput() method, MSCOMM gives the reponse only via the OnCommEvent() or via OnTime() events. Hence if i send the command thru one function , i'll get the response in some other function. So this does not satisfy my criteria of reading the smartcard in a single function.

    working on this problem since almost a week, i m frustrated ..
    so plz help if u hav any idea..
    its urgent...Confused

    • Post Points: 5
Page 1 of 1 (1 items)