Page 1 of 1

Changing Numbers

Posted: Wed Dec 31, 2008 2:37 pm
by spence
Hi,
I wonder if someone can help me with my project. A brief overview is:-
The project is basically like a memory dial. I have a PIC micro with LCD and Keypad connected. The user can enter a 1 to 3 digit number this number is displayed on line 1 of the LCD. When the user presses enter (using the # Key) my LCD displays Calling xxx. This is where I get a little stuck I need to have some form of lookup table or array I think, for instance entering the short 1-3 digit number needs to output a different number on 11 spare outputs (this is a prototype once I have completedc this I need the output to be a serial link)

example if the user enters "123" on the keypad and then presses enter I need to output the following

Port B Bit 0= Hi (0 Key Pressed)
Port B Bit 0 = lo (0 key released)

Port B Bit 1= Hi (0 Key Pressed)
Port B Bit 1= lo (0 key released)

the full output will be 11 output switches
01234567891
Thanks
Spence

Re: Changing Numbers

Posted: Mon Jan 05, 2009 5:16 pm
by Benj
Hello Spence

Not quite sure how your output would work there maybe you could explain a bit more.

The serial method should be a lot easier to get working and is more straight forward. If you have a COM port on your PC then you can use Hyperterminal and the chips onboard UART to transfer serial data. I wrote an article on getting this up and running in the knowledge exchange section of the forums if this would be any help to you.