Thread: how to develop look-up table

  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    8

    Question how to develop look-up table

    i was started to program PIC16f873 microcontroller. i want to generate single phase pulse width modulation using a natural sampling to control AC induction motor speed and i already get the value at the point. but i have a problem to program do a programming.

    the problem:

    what mode should i choose, it is compare mode or capture mode or just PWM mode?

    how to created a look-up table?

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    I have no idea what you are trying to do save for a look-up table. This can be accomplished via an associative array, hash table, std::map, std::set, or std::multimap. Map allows changes to the value while set does not. Both set and map have the constraint that 1 unique key maps to exactly 1 unique value. Multimap allows a unique key to be mapped to multiple values. A hash table can also support this depending on how the hash table is implemented.
    Last edited by VirtualAce; 10-07-2009 at 11:11 PM.

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    8
    Quote Originally Posted by Bubba View Post
    I have no idea what you are trying to do save for a look-up table. This can be accomplished via an associative array, hash table, std::map, std::set, or std::multimap. Map allows changes to the value while set does not. Both set and map have the constraint that 1 unique key maps to exactly 1 unique value. Multimap allows a unique key to be mapped to multiple values. A hash table can also support this depending on how the hash table is implemented.
    thanks for the recommendation...i try for this method.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. help with structs and malloc!
    By coni in forum C Programming
    Replies: 20
    Last Post: 09-14-2009, 05:38 PM
  2. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 05:06 PM
  3. progarm doesnt compile
    By kashifk in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2003, 05:54 PM
  4. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 04:03 PM
  5. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 07:18 AM