I am having real trouble trying to program an 8051 microcontroller using C and the Keil uVision2 complier suite. I have experience of C++ programming and I know exactly what I want to do with the microcontroller, as outlined below. The problem I’m having is I don’t know where or even how to start! I’ve read most of the Primer manual and looked at numerous examples, however as most of the code I’ve found isn’t commented and I’m having trouble understanding what’s going on… Can anyone point me in the right direction or help me find my feet in this new area of programming?
Many thanks, Jezhead
The microcontroller is a P89C51/RC2 and I need it to read in four 8bit numbers from four line drivers (reading one line driver at a time through the same port) when the microcontroller receives an interrupt. Once the data has been read into the controller I want to output the four numbers through a different port. I plan to use port 0 to read in the data, port 2 to output the data and pins 1.1 to 1.4 to control the line drivers (to select which driver is being read from).
Many thanks, Jezhead
The microcontroller is a P89C51/RC2 and I need it to read in four 8bit numbers from four line drivers (reading one line driver at a time through the same port) when the microcontroller receives an interrupt. Once the data has been read into the controller I want to output the four numbers through a different port. I plan to use port 0 to read in the data, port 2 to output the data and pins 1.1 to 1.4 to control the line drivers (to select which driver is being read from).