Results 1 to 9 of 9

Thread: help on conserving CPU usage

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    4

    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?

  2. #2
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    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.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    4

    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.

  4. #4
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: help on conserving CPU usage

    what reader and sdks you are using

  5. #5

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    4

    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.

  6. #6
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: help on conserving CPU usage

    i am also using the same things here...

  7. #7

    Thread Starter
    New Member
    Join Date
    Jan 2006
    Posts
    4

    Re: help on conserving CPU usage

    how do you update your status of the reader?

  8. #8
    VB Guru ganeshmoorthy's Avatar
    Join Date
    Dec 2005
    Location
    Sharjah, United Arab Emirates
    Posts
    3,031

    Re: help on conserving CPU usage

    by checking continuously using the timer event

  9. #9
    Member SAGremlin's Avatar
    Join Date
    Jan 2006
    Location
    JHB South Africa...
    Posts
    58

    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:
    1. Private Sub Form_Load()
    2. Timer1.Interval = 500
    3. Timer1.Enabled = True
    4. '----- Rest of your Form load code..
    and in the timer event you add your check for card code
    VB Code:
    1. Private Sub Timer1_Timer()
    2. '---- Query Port for card..
    3. 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....
    ____________________________________________

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width