Discussion in "8051 Discussion Forum" started by    Exterminator    Dec 22, 2009.
Tue Dec 22 2009, 08:20 pm
#1
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!
Tue Dec 22 2009, 08:44 pm
#2

(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
#3
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?
Tue Dec 22 2009, 09:19 pm
#4
your sequence seems to be wrong, look here in the datasheet.






Arun
 Exterminator like this.
Wed Dec 23 2009, 02:46 pm
#5
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?
Wed Dec 23 2009, 05:39 pm
#6
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.
 Exterminator like this.
Wed Dec 23 2009, 09:42 pm
#7
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
#8
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
#9
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?


Tue Dec 29 2009, 01:30 am
#10
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??
 Exterminator like this.

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

RolandPeamb
Sun Oct 13 2024, 12:58 pm
MarcusLip
Sun Oct 13 2024, 01:17 am
AlfredTus
Sat Oct 12 2024, 10:38 pm
Mazrdoh
Sat Oct 12 2024, 09:25 am
BillyThems
Sat Oct 12 2024, 07:04 am
ctaletpnyi
Sat Oct 12 2024, 04:40 am
Sazrjbp
Fri Oct 11 2024, 09:40 pm
Sazrblh
Fri Oct 11 2024, 08:08 pm