AT89C51RD2 programming
Discussion in "8051 Discussion Forum" started by Exterminator Dec 22, 2009.
Tue Dec 22 2009, 08:20 pm
Hello!
I have recently come up with a project to controll some lights with the AT89C51RD2 controller, but i've stummbled across a major problem i can't get around:
I simply can't program my controller. I planned the circuit to be ISP, but i'm having a lot of trouble with choosing the right program and programmer for the job. I've got the hex file written, all i need is to upload it...
Can someone explain to me (or point me to a website) how to set up the connection, what the specific pin connections must be (PSEN, ALE, EA, etc.), and what program is the right one to use (i've used FLIP till now, but it keeps giveing me the timeout error).
Thanks!
I have recently come up with a project to controll some lights with the AT89C51RD2 controller, but i've stummbled across a major problem i can't get around:
I simply can't program my controller. I planned the circuit to be ISP, but i'm having a lot of trouble with choosing the right program and programmer for the job. I've got the hex file written, all i need is to upload it...
Can someone explain to me (or point me to a website) how to set up the connection, what the specific pin connections must be (PSEN, ALE, EA, etc.), and what program is the right one to use (i've used FLIP till now, but it keeps giveing me the timeout error).
Thanks!
Tue Dec 22 2009, 08:44 pm
(i've used FLIP till now, but it keeps giveing me the timeout error).
are you following correct RESET sequence ?
Remember that the EA and PSEN signals are evaluated on the falling edge of
the RESET pin. So if your reset switch pulls the RESET signal low, PSEN must
be valid upon activation, not release.
Also note that upon completion of the RESET condition, the PSEN signal is
outputpin and therefore care should be taken to release this pin then reset
goes high again.
a fresh chip will be easy to program for the first time because it starts at the boot loader state.
Arun
Exterminator like this.
Tue Dec 22 2009, 08:56 pm
I have a RESET button tied to +5V, so when i power on the controller i hold down that button, connect the PSEN to +5V and then release the RESET button. Is the procedure correct and what do i have to do next?
Wed Dec 23 2009, 02:46 pm
I followed the powerup procedure correctly, but still can't get any response from the controller..(FLIP returns the timeout error) The EA and ALE pins, in what state do they need to be?
Are there any limitations around the MAX232 chip that i must follow? I havent constructed a circuit board yet so i build it on a proto board folowing the schematic in this datasheet:
http://www.atmel.com/dyn/resources/prod_documents/C51_Hardware_Connections.pdf
(2nd picture from the top - ISP interfacing)
I use a USB-COM adapter since my laptop does not have a COM port. Do i have to set some specific settings in the device manager or is it ok that i didn't change anything?
P.S.: How much current can a single pin sustain if (accidentaly) short-circued to VCC witouth the chip to be damaged?
Are there any limitations around the MAX232 chip that i must follow? I havent constructed a circuit board yet so i build it on a proto board folowing the schematic in this datasheet:
http://www.atmel.com/dyn/resources/prod_documents/C51_Hardware_Connections.pdf
(2nd picture from the top - ISP interfacing)
I use a USB-COM adapter since my laptop does not have a COM port. Do i have to set some specific settings in the device manager or is it ok that i didn't change anything?
P.S.: How much current can a single pin sustain if (accidentaly) short-circued to VCC witouth the chip to be damaged?
Wed Dec 23 2009, 05:39 pm
EA connected to VCC, ALE leave open and PSEN GND during reset will take your controller in ISP mode.
you can try the auto ISP interfacing schematic to control everything automatically by FLIP.
you can try the auto ISP interfacing schematic to control everything automatically by FLIP.
Exterminator like this.
Wed Dec 23 2009, 09:42 pm
I constructed the AUTO ISP circuit but the result was the same; timeout error.. May there be a problem with my USB to COM adapter? FLIP troubleshooter describes some alternate dll for some adapters used on laptops.. I'll try it on a PC as well..
Fri Dec 25 2009, 03:17 am
ah! yes, that probably is the point of failure. Not all USBCOM adapter works well. I recommend using MOXA for full uart interface. do try with PC and let us know.
Exterminator like this.
Mon Dec 28 2009, 05:58 pm
I re-tryed everything using a PC COM port and the result is the same..
I browsed the web a bit and i found a picture that shows(attachment) a PG-302 can be used to program a 51* series controller via MISO MOSI interface. Tell me is it possible and if, where can i find a detailed datasheet on it..
What programmers do you guys use to chip your controllers and what controllers do you use?
I browsed the web a bit and i found a picture that shows(attachment) a PG-302 can be used to program a 51* series controller via MISO MOSI interface. Tell me is it possible and if, where can i find a detailed datasheet on it..
What programmers do you guys use to chip your controllers and what controllers do you use?
Tue Dec 29 2009, 01:30 am
no that is not possible. that interface is for AVR controllers mostly.
RD2 is serially programmable. well i personally used FLIP and programmed AT89C51ED2 which is similar to RD2 but with eeprom. it worked perfectly for me.
can you provide a circuit that you've built??
RD2 is serially programmable. well i personally used FLIP and programmed AT89C51ED2 which is similar to RD2 but with eeprom. it worked perfectly for me.
can you provide a circuit that you've built??
Exterminator like this.
Powered by e107 Forum System