Thread: Need help with displaying better resolution

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    4

    Need help with displaying better resolution

    I知 trying to display numbers on LCD display for project I知 working on, I知 writing the code in C, here is example what I have tried but nothing work correctly so far,

    If I accumulate a number from external source into Micro controller 16 bit register, and I have to multiply the number by 60 and display, if input changes by 1 count the output changes by 60 which it should, I知 trying to get down to change by 1 , I have set array and done averaging and do the multiply, nothing
    Question: is their trick in c programming the could do this routine

    Thanks in advance

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    So ... don't multiply? (Or divide.) I'm not sure I see what your question is, exactly.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    4
    I have to multiply to show the correct number, I知 trying to control and display the speed of motor, but if the collect external pulse and if the numbers increment by 1 my output display will jump by 60, which is not acceptable, so I was thinking if there is anything I can do in C programming to get down to about 5 or maybe 10,

    Maybe what I知 thinking is not possible in software and need to look into hardware,

  4. #4
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Quote Originally Posted by jimmy_gg View Post
    I have to multiply to show the correct number, I’m trying to control and display the speed of motor, but if the collect external pulse and if the numbers increment by 1 my output display will jump by 60, which is not acceptable, so I was thinking if there is anything I can do in C programming to get down to about 5 or maybe 10,

    Maybe what I’m thinking is not possible in software and need to look into hardware,
    Last time I did this, the motor controller board had it's own little "Operating system". The booklet that came with it described how to set various parameters, make and run your own programs, etc.

    I would google your micro controller, check any documentation you can find, and see what the integrator/manufacturer and or guru's for that piece of hardware, advise.

    Is it trying to show the rp/minute gain from a gain of "1"? That might be a dip switch set wrong, or a wrong wiring hook up. You want rp/second to show on the display, I think.

  5. #5
    Registered User
    Join Date
    Jan 2009
    Posts
    4
    I have use this micro controller over the years, I have the manuals, and currently writing the code in C for it, sorry it痴 not anything inside the chip it self, what I was thinking maybe there is trick in c programming, using floating number or array or any of the math library to do this, maybe not, I知 still looking

  6. #6
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    I have no idea what you actually are trying to achieve, but it sounds like you are sampling some sort of sensor, and each time you get a pulse, you add one to a count, that is then multiplied by 60 and displayed. Am I right so far?

    And you want it to increment in smaller steps, not 60 at a time?

    So from a purely logical basis, what are you trying to do(ignore C, assembler, microcontrollers, etc)?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  7. #7
    Registered User
    Join Date
    Jan 2009
    Posts
    4
    You池e correct, I知 counting the external pulses from the motor and in order to display the speed on LCD display, I need to multiply by 60, and if the external count changes by 1 count the display jumps by 60, I知 trying to do something in C, averaging method to come up with smaller increment, I currently trying to take more samples pulse achieve a better resolution,

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ubuntu screen resolution
    By lruc in forum Tech Board
    Replies: 13
    Last Post: 11-27-2008, 05:03 PM
  2. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 09:05 AM
  3. Displaying Arrays
    By mr_spanky202 in forum C Programming
    Replies: 3
    Last Post: 04-07-2003, 02:22 PM
  4. DOS resolution problem in Win2k
    By charisma in forum C Programming
    Replies: 2
    Last Post: 12-27-2002, 05:04 AM
  5. Screen Resolution
    By C_Coder in forum A Brief History of Cprogramming.com
    Replies: 28
    Last Post: 12-21-2001, 08:01 PM