SparkFun Forums 

Where electronics enthusiasts find answers.

Discussions on the software and hardware for Atmel's STK standard.
By Guest
#748
Hello I am trying to use my new AVRISP programmer from atmel.
Background of my host system :
red hat linux 9 running on a Pentium II. I am using UISP programming software.I am trying to use AVRISP as my hardware programmer. (was previously using a stk200 parallel port programmer from olimex). I am using the Atmega128 Header board from Olimex.

I am having 2 problems.
1) When i try to 'make flash' in my own user mode i get a ioperm error as follows
$ make flash
uisp -dprog=avrisp -dserial=/dev/ttyS0 --erase
ioperm: Operation not permitted
Failed to get direct I/O port access.
make: *** [flash] Error 2

*however* when i do it as root i am atleast allowed access to serial port
ps: i have tried the usual chmod a+wr /dev/ttyS0 and also tried changing owner of /dev/ttyS0 to myself from root using chown

2) My main problem is however more confusing .
as i said when i switch to root i am atleast allowed access to serial port
but then i get this error when i try make flash

root$ make flash
uisp -dprog=avrisp -dserial=/dev/ttyS0 --erase
An error has occurred during the AVR initialization.
* Target status:
Vendor Code = 0xff, Part Family = 0xff, Part Number = 0xff

Probably the wiring is incorrect or target might be `damaged'.
make: *** [flash] Error 2

Now i know the warning isn't true as i rechecked with my Parallel port stk200 programmer and my device is fine and programs well.
Also if i add 'dpart=atmega128' to the command line in the makefile then this happens

uisp -dprog=avrisp -dpart=atmega128 -dserial=/dev/ttyS0 --erase
Atmel AVR ATmega128 is found.
Invalid parameter: -dserial=/dev/ttyS0
make: *** [flash] Error 1

It finds the ATMega128.... I dont know how. My guess is that it didnt find the atmega128 , it is just assuming... cause if it found it then there really should be any problem programming it.Note that the error message also says Invalid parameter: -dserial=/dev/ttyS0
I have made sure that the Atmega128 board is powered well
The light on the AVRISP goes green so i guess its powered ok. What is going wrong.?
Is there a problem with the serial port itself how can i check it?
I wrote a small program in C to send characters from my serial port and it showed fine on the oscilloscope. so the serial port seems to be fine. has anyone tried using the
Avr-h128B header board with AVRISP hardware programmer?
By Guest
#755
i got the bug
u have to use the -dprog=stk500 NOT -dprog=avrisp