| ??? 03/27/00 21:23 Read: times |
#1980 - RE: Help with code(Bascom) !! |
Hi,
This is not a problem. Basically you require 3 functions: 1- Input the keys 2- Output to LEDs 3- Output to LCD screen. All of them are not difficult at all but for using the LCD you would need some exercise with coding, otherwise you may be lost-in-action. Please see the tutorial at the 8052.com site, it has all the items you want. try to do it in two seperate segments. 1- Develope the code for Input the key, debounce the key and decode it. Then send output to appropriate pin to lit the LED. It is so simple, one way is how babar explained you. 2- after sucessfully develop the code for first one, try to work on LCD. You can obtain, a trial shareware 8051 simulator from 8052.com site. IT will help you evaluating your code before you burn your code to the 8051 chip itself. Hints: 1- try to use 8051 output as active low, at the LED end. As 8051 pins might not be able to source enough current to full-glow the LED so you can connect, LEDs anode to the CPU pin, and cathode to +5v power with a 220ohm or 390ohm resistor. Since you make your code as normal high output, led will not glow until output pin goes low, and 8051 pin will start sinking the current. 8051 pins can sink upto 20mA which is quite enough for LED to full-glow. 2- Try to use flash 8051 chips, such as Atmels 89C2051 or 89C52. They are multiple time programable MPs. So you will not waste your money, incase you want to change your code later (and you will do it for sure). Thanks, Rauf / Microlink |
| Topic | Author | Date |
| Help with code(Bascom) !! | 01/01/70 00:00 | |
| RE: Help with code(Bascom) !! | 01/01/70 00:00 | |
RE: Help with code(Bascom) !! | 01/01/70 00:00 |



