Please help me interface the uC with the PC

Go To Last Post
15 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So, after two nights spent with my soldering pistol, and multimeter, I realized, I just can't get this thing to work!

I have bought an (two, more exactly) ATMEGA8515-16PU microcontroller, and I would like to program it with my Intel 2,4Ghz PC. I've WinXP installed with giveio.sys. I have built the SP12 ISP cable, and made the connections available there,
LPT uC
2 --> 8 (SCK)
3 --> 9 (RESET)
4-8 --> 1 (VCC)
9 --> 6 (MOSI)
11 --> 7 (MISO)
25 --> 20 (GND)

uC

GND --> 27pf --> 18 --> 4Mhz Chrystal --> 19 --> 27 pf --> GND

But when I try to program it, nothing happens. I have tried to tie a LED between VCC and GND, try the programmer, this way the LED should blink, but nothing happens!
I have checked in BIOS, the LPT was in SPP mode
I thought maybe my LPT port was damaged, so I tried it out on my linux box, doesn't work there either.

I used the software provided there, ponyprog, avrdude and avrsp, nothing works :((

AVRDUDE:
avrdude.exe: AVR device not responding
avrdude.exe: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude.exe done. Thank you.

PonyProg: "Unknown device, or device missing" (used DT-006 I/O)

AvrSP: "No ISP adapter on port LPT1"

Please, tell me people, what am I missing? (And I know it is some little thing so that I can bang my head into the wall when I realize it...)

axos88

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

...and for all that effort you could have just went online to digikey and bought a http://catalog.digikey.com/scripts/partsearch.dll?Detail?name=ATAVRISP2-ND

sigh....I'll never understand.....

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sgomes wrote:
...and for all that effort you could have just went online to digikey and bought a http://catalog.digikey.com/scripts/partsearch.dll?Detail?name=ATAVRISP2-ND

sigh....I'll never understand.....

And I'll never understand you either :)
You need to understand that 1) not everybody has the same resources as you, 2) not everybody has access to the same resources as you and 3) not everybody thinks it's worth to spend a certain amount of money in an experience.

Well, regarding the original question, I've never used any of the software you mention, but I can give some hints.
Start by checking if the LPT is really working. If you have an oscilloscope, measure the LPT pins to see if there's any activity; if you don't, I guess you can connect a LED in series with a big resistor (> 2,2K) and see if there's any light during programming (don't abuse on this test because LPT's usually don't provide much current and you may be pulling too much from it). Check the signals also at the other end of the cable.
Make sure your cable isn't too long. Try something like 20cm; if you have resistors in series on the cable, put them near the AVR and not near the LPT!
Are you providing proper power to the AVR? Put a 100n cap Vcc to GND on the AVR.
Are you providing proper clock to the AVR? With factory defaults (fuses), does it need one? Check the datasheet.

Do also a search in the forums here, because there are many threads about similar problems (that's the reason for sgomes comment :) ).

Good luck :)

Embedded Dreams
One day, knowledge will replace money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I have tried to tie a LED between VCC and GND, try the programmer, this way the LED should blink

You have to supply the target with power. This also powers the programmer (if not a passive one)...

Klaus
********************************
Look at: www.megausb.de (German)
********************************

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello,
I use SP12 and update the _sp12dev file for new devices as they come along. I use the Ken's dongle design between the parallel port and the AVR. This is a 74HC126 non-inverting buffer IC between the parallel port and the device. I power the AVR device through the parallel port and the HC126 also.
PC makers only guarantee that the parallel port will supply data voltage levels. Sometimes the high level will fall below the threshold when a small amount of current is drawn from the pin, hence the buffer chip.
I can confirm that the SP12 software program works so it must be a hardware issue.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Did you read the threads in the tutorial section about parallel port programmers? Most of the common faults have already been encountered and remedied there.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well there were several problems that I have fixed ( I used a p2p paralel cable, oops, and guess what? the male and female connectors have the pins mixed up. If you connect them together, pin1 from the male doesn't go to pin1 from the female.... But it still won't work :(

I don't have 1nF capacitors between the crystals and the ground now (i pulled the 27pF ones out to make adjustments to the connectors, and have lost them, I'll have to buy others tomorrow),
I have a 4Mhz Crystal on XTAL1-XTAL2. If I don't have to provide a crystal by factory defaults, that shouldn't bother the uC now, should it?
(...)
Just run over the datasheet, it says that it runs from internal oscillator by default, going to remove it from the circuit then.

The programmer is a passive one, it should draw power from the D2-D8 pins, so i don't have to power it... But i'm going to try that one out as well

axos88

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I think I read on a thread that the internal 1MHz oscillator may be too slow for the speed that some programming software works at, but I'm not sure. Anyone remembers this?

Embedded Dreams
One day, knowledge will replace money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nuno wrote:
sgomes wrote:
...and for all that effort you could have just went online to digikey and bought a http://catalog.digikey.com/scripts/partsearch.dll?Detail?name=ATAVRISP2-ND

sigh....I'll never understand.....

And I'll never understand you either :)
You need to understand that 1) not everybody has the same resources as you, 2) not everybody has access to the same resources as you and 3) not everybody thinks it's worth to spend a certain amount of money in an experience.

Allow me to defend myself:

1) If you don't have the resources for the most basic tool of this hobby/profession then what are you doing? If you seriously cannot afford $34US then I think you should be more worried about where your food is coming from than trying to play with microprocessors

2) Granted buying from digi-key overseas can be costly but there are PLENTY of other options on the other side of the pond.

3) There are many many experiences that are worth the effort. It's the path not the goal. Believe me I understand that very well. This is not one of those experiences. I can sit back and appreciate the wheel without having to build one myself.

Go electric!
Happy electric car owner / builder

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'll repeat something I've posted to these "It is better if I build it myself for the experience, even if it works for crap or never works and I get frustrated" threads:

I hope that all of the "better to build the programmer myself" fans aren't using the Atmel or other assembler. After all, all the information on the op codes is out there, and doing an assembler is straightforward, and all that experience to be gained...

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First of all, you don't need to defend, I wasn't accusing you of anything :)!

sgomes wrote:

1) If you don't have the resources for the most basic tool of this hobby/profession then what are you doing? If you seriously cannot afford $34US then I think you should be more worried about where your food is coming from than trying to play with microprocessors

I strongly disagree.
If I only have $10 bucks to spend in a hobby I would really liked to learn, should I give up because I can't afford the $34, even if there are more affordable although more difficult paths? In my opinion that is a defeatist pose.
How much should I be able to afford before I can stop being worried about where my food is coming from?

sgomes wrote:

2) Granted buying from digi-key overseas can be costly but there are PLENTY of other options on the other side of the pond.

It depends on where you live.

sgomes wrote:

3) There are many many experiences that are worth the effort. It's the path not the goal. Believe me I understand that very well. This is not one of those experiences. I can sit back and appreciate the wheel without having to build one myself.

A wheel is an extreme case. But even so, why can't I have the pleasure of (re-)building one? "Pleasure" is a subjective subject. You can advise and that is appreciated, but each one knows about the things that give it pleasure.

I really don't see this discussion productive and we're getting off-topic, so if you think it is worth continuing it's probably better to make it private.

Embedded Dreams
One day, knowledge will replace money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

sgomes wrote:
If you seriously cannot afford $34US then I think you should be more worried about where your food is coming from than trying to play with microprocessors

Sorry for this political comment but in some countries $34 is the monthly income and you can be pretty darned certain that folks earning that are far far more concerned about where their next meal is coming from than those of us living in the affluent wealth of the western world. One way to "step up the ladder" is to develop a saleable skill like microcontroller programming. Even folks in the former eastern block, while not on existence wages, have to "make do" with the limited equipment they have access to.

Cliff

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Sorry for this political comment but in some countries $34 is the monthly income ...

True enough, and as an old farm boy I've "made do" a lot.

That doesn't change the fact that the "economy" parallel-port programmers have their issues, especially when applied in a variety of environments. There have been many, many threads on them over the years with the same symptoms repeated over and over.

The same people that are reporting the symptoms may very well be those with a severely-limited budget. That shouldn't stop them from searching for similar threads. That shouldn't stop them from making a better stab at it than "It doesn't work! What's wrong?"

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

theusch wrote:
(...)
The same people that are reporting the symptoms may very well be those with a severely-limited budget. That shouldn't stop them from searching for similar threads. That shouldn't stop them from making a better stab at it than "It doesn't work! What's wrong?"

I strongly agree!

Embedded Dreams
One day, knowledge will replace money.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well I have built an SI-PROG (Serial), and it works perfectly... I'd strongly suggest to anyone stuggleing with paralel programmers: build a serial one, windows has issues with the LPT port, and it isn't more expensive then the LPT ones.

And about the moneything... In Romania you do NOT have any kind of 'digikey', and your monthly wage is about 200$... So i really DONT have 34$ to spend on a hobby... But I can spend 5$ to build a serial programmer, and then sell my code to the local electronics shop (yeah, they actually got interested, when i said i was programming uC's :D)

axos88