GIDForums  

Go Back   GIDForums > Computer Programming Forums > Assembly Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 14-Apr-2008, 14:57
martini80 martini80 is offline
New Member
 
Join Date: Apr 2008
Posts: 1
martini80 is on a distinguished road

Potentiometer offset?


Using Motorola HC68...Designing a game of Pong using potentiometer to control the bat (paddle). The potentiometer's range is between 0-255 and the screens range that it needs to cover is between 0-50...

I was trying to multiply/divide using the following to get the correct reading - ADC_input * 50 / 256. I was trying to multiply using instruction MULU. I tried ADC_input * 2, just to see if it would work and it did up until a certain value and then it just kept randomly multiplying no matter which way I turned the potentiometer. I presume its something to do with mixing up bytes with longs. Any help or better methods in getting the correct input?
 

Recent GIDBlog2nd Week of IA Training by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Two bugs in my program that just won't go away. randomperson133 Assembly Language 1 23-Mar-2008 07:04
Trying to read BMP files, header information is wrong / offset Algar CPP / C++ Forum 5 24-Feb-2008 03:00
Thread synchronization Assignment help!! rossi143 C Programming Language 1 25-Mar-2007 20:10
Pcap programming in C++ goal86sg CPP / C++ Forum 2 25-Jan-2006 14:02
Dynamic Memory Allocation - Offset Pointers wu_weidong C Programming Language 6 24-Feb-2005 09:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:03.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.