Changing Numbers

Any general or miscellaneous queries that do not fit into the other forum catagories

Moderators: Benj, Mods

Post Reply
spence
Posts: 11
Joined: Wed Dec 10, 2008 7:42 pm
Contact:

Changing Numbers

Post 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

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Changing Numbers

Post 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.

Post Reply