help on conserving CPU usage
i am programming a smart card and i was wondering if i could halt my codes until a card is detected present at the smart card reader without using a loop. using a loop until a card is detected can do the job but it eats a lot of the CPU usage. i would like to execute my codes until a change in status is detected, ie. a smart card is detected. sleep can't help either. can someone help me on this problem?
Re: help on conserving CPU usage
first of all welcome to vbforums.
I was really searching for a person who does smart card programing
there should be something for that. i still use the timer to findout the status.
Re: help on conserving CPU usage
thanks, i'm not really familiar with the accessing of the timings. i just followed the sample codes packaged with the product.
Re: help on conserving CPU usage
what reader and sdks you are using
Re: help on conserving CPU usage
ACR's the card is ACOS2. the one with the processsors. i'm trying to create a program that will respond to a smart card present in real time without using too much of the CPU.
Re: help on conserving CPU usage
i am also using the same things here...
Re: help on conserving CPU usage
how do you update your status of the reader?
Re: help on conserving CPU usage
by checking continuously using the timer event
Re: help on conserving CPU usage
Quote:
Originally Posted by uchiha-kakashi
i am programming a smart card and i was wondering if i could halt my codes until a card is detected present at the smart card reader without using a loop. using a loop until a card is detected can do the job but it eats a lot of the CPU usage. i would like to execute my codes until a change in status is detected, ie. a smart card is detected. sleep can't help either. can someone help me on this problem?
add a timer to your form.. and in the form_load event add
VB Code:
Private Sub Form_Load()
Timer1.Interval = 500
Timer1.Enabled = True
'----- Rest of your Form load code..
and in the timer event you add your check for card code
VB Code:
Private Sub Timer1_Timer()
'---- Query Port for card..
End Sub
This will check for card details every .5 of a second (will Give near immidiate responce too) with out slaveing the proccesor..
Gremmy....