i have problem with the led blinking. I using the exmaple program given by keil using uVision3. When i run the program, the LED on the development board didnt blink, it just stay on! wat should i do?
thanks!
i saw this digram on how control word works. Link: www.sharpmz.org/.../8255ovview.htm
That link refers to an 8255 chip.
You have never mentioned before that you are using an 8255 chip.
How is anyone supposed to guess what chips you might be using if you don't say?
If you want to use an 8255 chip then, in addition to studying the 8051 and how to use it, you are also going to have to spend time studying the 8255 chip and how to use it.
It seems that you haven't even mastered the basics of the 8051 yet - so you really shouldn't be messing about with the added complications of an 8255 at this point!
Again, the basics for the 8051 are in the so-called "bible":
Chapter 1 - 80C51 Family Architecture: www.nxp.com/.../80C51_FAM_ARCH_1.pdf
Chapter 2 - 80C51 Family Programmer's Guide and Instruction Set: www.nxp.com/.../80C51_FAM_PROG_GUIDE_1.pdf
Chapter 3 - 80C51 Family Hardware Description: www.nxp.com/.../80C51_FAM_HARDWARE_1.pdf
For a tutorial on the basics of the 8051 - including how the ports work - see: www.8052.com/tutorial.phtml
There is a whole section about 8051 port IO at http://www.8052.com/faqs - in particular, see: www.8052.com/.../120176
And, of course, the book lists: http://www.keil.com/books/8051books.asp www.8052.com/books.phtml
That link refers to an 8255 chip. not for beginners (and not for advanced either, unless you are an anachronism) In the olden days the 8255 had its merits; however today all uCs outrun the 8255 and, in addition to the crummy interface, you will get timing problems.
Of course, you 'can' use a 2MHz crystal or such, but what's the point?
Erik
oo ok cause i heard from my teacher that it need to use control word to program the port whether the port should be input or output. guys thanks alot, i will go read up on the links that you have given me. realli thx alot:)