how to develop look-up table

This is a discussion on how to develop look-up table within the C++ Programming forums, part of the General Programming Boards category; i was started to program PIC16f873 microcontroller. i want to generate single phase pulse width modulation using a natural sampling ...

  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
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    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-08-2009 at 12:11 AM.

  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, 06:38 PM
  2. Writing array, to file
    By zootreeves in forum C Programming
    Replies: 9
    Last Post: 09-08-2007, 06:06 PM
  3. progarm doesnt compile
    By kashifk in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2003, 06:54 PM
  4. extra word printing
    By kashifk in forum C++ Programming
    Replies: 2
    Last Post: 10-25-2003, 05:03 PM
  5. inputting words from a file
    By kashifk in forum C++ Programming
    Replies: 5
    Last Post: 10-24-2003, 08:18 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21