|
-
Jan 24th, 2006, 02:26 AM
#1
Thread Starter
New Member
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?
-
Jan 24th, 2006, 02:29 AM
#2
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.
-
Jan 24th, 2006, 02:37 AM
#3
Thread Starter
New Member
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.
-
Jan 24th, 2006, 02:40 AM
#4
Re: help on conserving CPU usage
what reader and sdks you are using
-
Jan 24th, 2006, 02:45 AM
#5
Thread Starter
New Member
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.
-
Jan 24th, 2006, 02:46 AM
#6
Re: help on conserving CPU usage
i am also using the same things here...
-
Jan 24th, 2006, 02:55 AM
#7
Thread Starter
New Member
Re: help on conserving CPU usage
how do you update your status of the reader?
-
Jan 24th, 2006, 05:33 AM
#8
Re: help on conserving CPU usage
by checking continuously using the timer event
-
Jan 24th, 2006, 05:56 AM
#9
Member
Re: help on conserving CPU usage
 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....
Articles VB6 : Break the 2G limit - Animation 1, 2 VB.NET : 2005/8 : Moving & sizing Images , Animation 1 , 2 , 3 , User Controls
Projects & Code snips: VB6 Hex Edit, IP Chat, Copy Prot., Crop, Zoom, moving images : .NET IP Chat (V4), Adv. ContextMenus, click Hotspot, Scroll Controls
Other Projects : Direct Physics - Inter Wise Proxy
Find me in VB6., VB.NET , Writing Articles, My Genealogy, wiccca Forum ____________________________________________
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|