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.

uC failed?

Status
Not open for further replies.

mstechca

New Member
I finished my microcontroller programmer ;)

When I send the data from the computer to the microcontroller, I managed to have the data sent synchronously, and it seems that the computer is showing full co-operation with me, even if I used a low clock rate of 500ms.

HOWEVER, when I tried using the microcontroller alone after programming it, I'm not receiving correct data.

The only thing I'm thinking is that I'm sending wrong parameters.

Included in my circuit is a clock with an LED that blinks at apecified intervals.

Here's another thing interesting. When I insert one microcontroller into the socket to be programmed (in the right way), the LED blinks twice the speed. When I replace it with a new one, the LED blinks at the normal speed. When I connected my LCD to the circuit, the same thing happens.

why?

All microcontrollers are at89c2051.
and the programming pin is set to 12V during programming and grounded when complete.
 
Which programmer are you using? Can you show us the schematic?
If its parallel port based, I am sure this is a timing related problem. If the programmer software is DOS based, try running it in pure DOS mode. This may work.
 
I made my own programmer and I am using QuickBasic to send the data to the LPT port.

Basically my circuit consists of a 4017 counter and a 74HC00 nand gate. What it does is the following:

At the beginning, XTAL bit is low, and PROG bit is high. The sequence is as follows. Each step lasts for 1/2 a second.

1. PROG becomes low, and BUSY (of the LPT port) is high.
2. PROG turns high.
3. XTAL becomes high.
4. XTAL turns low.
5. BUSY is turned off.

When the strobe is activated, the counter is reset, and the above sequence is repeated.
During programming, pin 1 of the microcontroller is set to 12VDC.

The problem I have is when I'm ready to start the microcontroller as a computer system, it fails. It seems no bits are turned on, even though I programmed it according to ATMEL's instructions.

Although, the only thing I think might be causing some trouble is the LCD, because when I hook the VCC of the LCD to +ve and the Ground of the LCD to ground, and the LCD drive voltage to +ve through a 200 ohm resistor, the LCD turns on, but the LED in the counter circuit flashes at twice the normal rate. I think maybe the LCD is hogging too much power.

I'll post the circuit the moment I have a chance to do it.
 
So, from what I understand?, you've designed your own programmer?, and written your own software to control it? - and it doesn't work?.

Your problems here are many fold, you've no idea where the problem might lie!, it could be either your hardware, either a constructional error, or simply a design flaw?. Likewise it could be a programming error in your software (a bug), or a flaw in the original software design?.

As in any diagnosis, you need to isolate where the problem might lie, but in your case this is going to be EXTREMELY difficult, you have many possibilities, and no way to isolate where it might be!.

Assuming the circuit is the one you posted previously?, I thought it looked completely strange? - like no programmer I have ever seen!. I'm not familiar with the micro-controller you're using, so perhaps that's what's needed?, did you get the basic design from a datasheet?.

What you really need to do is use either proven working software on your programmer, or a proven working programmer with your software - in that way you can isolate the problem.
 
The picture in this post is my circuit.

The circuit is working as far as writing the data to the at89c2051 chip is concerned. I have set appropiate levels to P3.3, P3.4, P3.5, and P3.7 pins on the chip for programming.

The major problem is when I am ready to test the chip (even with one lousy LED connected to P1.4 for example) after it is programmed, it fails to work.

Is there a simple way to test the chip (doesn't matter what code is stored) to determine if it is damaged or not? Some of the uC's were warm when I programmed them.
 

Attachments

  • cir.gif
    cir.gif
    6.6 KB · Views: 600
This is the original schematic. I had to create one myself because most schematics required a transceiver or a buffer which I do not want to use.
 
mstechca said:
This is the original schematic. I had to create one myself because most schematics required a transceiver or a buffer which I do not want to use.

So you really don't have any definate knowledge that this circuit even works?. As I mentioned before, it looks really strange?.

A quick google found this https://www.dontronics.com/pa_pgm.html, which looks like a programmer, whereas your one doesn't?.
 
The good news is that the microcontroller appears to be providing proper output. However, it seems that my relaxation oscillator is incompatible with the uC even though the oscillator functions as an oscillator.

When I read the uC datasheet, it states that XTAL2 is the output of an inverting amplifier, and XTAL1 is the input. It also states that XTAL1 can be connected to the output of an external oscillator and XTAL2 should be conected to nothing.

I wonder if XTAL1 is being misrepresented in the manual.
 
Status
Not open for further replies.

Latest threads

Back
Top