??? 12/15/09 19:41 Read: times |
#171635 - BASCOM help |
Hi Everybody,
I'm quite new in microcontrollers, and I have a bunch of basic questions. I'm a university student, and we are learning about 8051 on Digital systems subject. We are using AT89S52 mcu, and sadly, the education of the programming is so bad. We are using an old C based IDE, and I'm not very good in C, but I'm using qbasic for a long time, so I started to use BASCOM for my 8052 at home. I made led blinker and running light programs, but now I want more: using external signals to control the mcu. So I want to make basic programs, which should work something like this (for example): if I press a button which is connected to a port of the mcu, a led (connected to a port) lights up, when I press the button once again, it goes dark. I wrote a program that made a led light up until I held the button pressed, but it sometimes worked, sometimes not and I don't know why. So I would like to know how to start writing a program which uses outer signal(s) to control program flow. If anyone can help me, please let me know! Thanks, Levente Trifonov |