This might be a basic question. Let say I will program my 8051 with C language. How can I transfer the program into the microprocessor?
I used to use Parallax's Board of Education as my microprocessor, and BasicStamp as the programming language. What I needed to do was to program with BasicStamp and transfer my code to microprocessor through a serial cable. (Since BasicStamp is compatible with BOE) Now, for C language and 8051 with the tools I got in the picture, how may I do that? Thank you for helping.
Once you have an application written in C you will have to compile it and this will create a HEX code.
The AT89C51 doesn't have the capability to be programmed through serial port so you will need a external device and this device will program the flesh memory inside the AT89C51 with the HEX code of your application ..
However, if you select a microcontroller with so called "In-System Programmable through Serial Port" feature you will be able to program it using just serial port ..
Added after 10 minutes:
You can order free samples of DS89C420 from Maxim_IC:
**broken link removed**
THis stuff can be progammed using the PC's serial port ..
I believe mine is just a regular 8051 microcontroller that's not capable of programming through serial cable. So what specific type of external device do I need to program the 8051 flash memory with the HEX code? Thanks.
Competition is a great thing ..
There are others who offer free samples: Analog Devices, Microchip, ....
Main thing is not to abuse this system ..
However, as far as I know some of the above companies have a list of countries where they will NOT send enything ..
If I use the type of 8051 that enables "In-System Programmable through Serial Port", then I guess I'll need to get a serial port, and one end will be connected to the serial cable, which connects to the PC to transfer the HEX code. What does the other end of the serial port connected to?
From the picture you provided, it seems you still need a 5 volts regulator, or a 7805. You need this to produce stable 5 volts where your AC adaptor output would be probably still higher than that.
If your 8051 chip is an AT89C51, i advise you to switch to AT89S51 or AT89S52, because it is much easier to program. They can be programmed without a dedicated programmer. You can check a good software: AEC_ISP. It uses parallel cable connection to PC, and the microcontroller should be placed in a minimum system ( just add a crystall oscillator with 2 capacitors, give Vcc, and put appropriate reset circuits using a simple C and R).
Hey irfansyah, I was trying to get a copy of the AEC_ISP.exe software. They sent me an email containing AEC_ISP.exe, but I've trouble downloading it from my email... Do you happen to have a copy of the software? Could you post it on the forum? Thanks.
When I checked on the DS89C420 datasheet, I found out that the microcontroller only has 4 bi-directional I/O pins. That's not quite enough for my robot, since I need at least 5 (2 for left motors, 2 for right motors, 1 for distance sensor)... How come 8051 only has 5?? My Parallax's Board of Education has 15 I/O ports...
DS89C420 have 32 bidirectional I/O pins.
The 4 is the number of bidirectional I/O ports, each of them has 8 I/O pins.
Read more in the page 12, 13 regarding pin description.