Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Resetting a AT89LP4052

Status
Not open for further replies.

badbaud

New Member
On my C4051 projects I always tied a DS1833-10 to the reset pin of the MCU for a good power up reset.

I am trying to migrate to a LP4052 and built a small test board with a 10 pin header to program the MCU with a mikroProg module.

I wrote some simple code that works with the C4051 to toggle a port pin on and off (P1.1).

I set the LP4052 for quasi bidirectional port pin configuration, internal 12MHz R/C clock.

The code assembled and loaded into the LP4052 with no errors but the LP4052 won't wake up.

I then set the fuse to send the system clock out of P3.7 to see if the MCU was running, no clock out was seen with my scope.

On the LP4052 I simply tied a 10K resistor from the reset pin to Vcc.

Should reset be tied to ground instead or is there some R/C value I need to add or should I leave the pin floating to get a proper power up reset?
 
I put a 10K to ground and loaded the program and tried again. Still no luck getting the MCU to work. For my first attempt I am simply trying to see p1.1 toggle on and off plus see the sysclk on p3.7.

here is the code I have written, Is there some PSR I need to set to get the MCU to work?

FORG: ORG 0000H
JMP START

START:
MOV 0C2H,#00H ;SET PORTS AS QUASI BIDIRECTIONAL
MOV 0C3H,#00H
MOV 0C6H,#00H
MOV 0C7H,#00H

TIMER_TEST:
CALL LEDON ;P1.1 SHOWS PULSES
CALL POINT_1_MS
CALL LEDOFF
CALL POINT_1_MS
JMP TIMER_TEST

;
POINT_1_MS:
MOV R3,#01H
MSIMERB: MOV R2,#250D
MSIMERC: MOV R1,#250D
MSIMERD: NOP
DJNZ R1,MSIMERD
DJNZ R2,MSIMERC
DJNZ R3,MSIMERB
RET

LEDON: CLR P1.1
RET
;
LEDOFF: SETB P1.1
RET
 

Attachments

  • prog img.jpg
    prog img.jpg
    77.4 KB · Views: 377
What I did was hand build the 20 pin section of the attached schematic as my programming and testing platform.

I wired in the 10 pin header that goes to the mikroProg to the MCU legs and added a PROG / RUN jumper (tonight, thank you for your input on the reset problem). In PROG mode the jumper connects a 10k resistor from Vcc to pin 1.

In RUN mode, where my 5V supply is used, (the mikroProg module provides 5V during programing) the jumper connects pin 1 to ground via a 10K resistor.

Yes all of the other 10K resistors are still connected when the MCU is in RUN mode, could that be causing the problem?

I assumed 10K would be high enough resistance not to bother with the MCU's operation.
 

Attachments

  • 8051ready_schematic.pdf
    902.7 KB · Views: 347
In RUN mode, where my 5V supply is used, (the mikroProg module provides 5V during programing) the jumper connects pin 1 to ground via a 10K resistor.

I thought that chip needs 12v vpp... The reset will need a bit more circuitry for dual operation The 10k to ground will be fine but the voltage on the pin must be 5v to run and 12v to prorgram
 
The mikroProg module uses the USB 5 volt to convert and apply the proper voltages for programming.

Once the MCU is programmed I can read back and verify the code is in the MCU and even read the bin file from the MCU so the mikroProg module is doing it's job correctly.
 
So! Are you using the 8051 ready board, or are you using the home grown one that you made yourself??

Have you got an Oscillator connected to The osc pin, as you have the bypass fuse checked... The 8051 has the opamp amplifiers externally..
 
Ya, it is home grown and the crystal was the problem. Checked or unchecked I could not get any activity.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top