Sign in

username:

password:



Not a member?

Search avrclub



Search tips

Subscribe to avrclub



avrclub by Keywords

AT90S2313 | AT90S8515 | ATMega | ATmega128 | ECL | FETS | IAR | Keyboard | LCD | STK50 | TMOS | UART

Ads

Discussion Groups

Discussion Groups | AVRclub | please help regarding ATMEGA162 and STK500

Atmel AVR Microcontroller discussion group.

please help regarding ATMEGA162 and STK500 - kkazakos2003 - Mar 3 11:45:00 2006

Hello dear friends,

I am currently new in th euse of STK500 for ISP programming.
I am using an ATMEGA162.

The little thing that I am trying to do is to light a led in the STK500.

My code is like this:
--------------------------------------------------
.include "m162def.inc"

.org 0x000
rjmp RESET	;external pin, power-on and watchdog reset

.def temp1  = r16
.def temp2  = r17 

;--Main source code

RESET:
	ldi temp2,0xff	
out DDRB,temp2	ldi temp1,0x01
out PORTB,temp1	

-----------------------------------------------

I know it is quite simple, but i want to begin from the simple things
first..

The problem that I have is that it simply does not work in the STK500.
I mean, when I used an ATMEGA161 it worked perfectly.

Right now with th euse of the ATMEGA162 it does NOT work.
ANd i cannot understand why..

Please help me..

thanks
	


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )


Re: [AVR club] please help regarding ATMEGA162 and STK500 - Jim Bacon - Mar 4 11:02:00 2006

the STK500 hardware "inverts" the logic output of the ports to the 
LED's on the board, such that:
a "0" lights the LED,
a "1" turns it off.

if that's all there is to your code, LED 0 should be OFF, and LED's 
1-7 should be ON.

... that assumes you put jumpers from the port B pin header to the 
LED header ...

At 08:45 AM 3/3/2006, you wrote:
>Hello dear friends,
>
>I am currently new in th euse of STK500 for ISP programming.
>I am using an ATMEGA162.
>
>The little thing that I am trying to do is to light a led in the STK500.
>
>My code is like this:
>--------------------------------------------------
>.include "m162def.inc"
>
>.org 0x000
>rjmp RESET      ;external pin, power-on and watchdog reset
>
>.def temp1  = r16
>.def temp2  = r17
>
>;--Main source code
>
>RESET:
>
>
>ldi temp2,0xff
>out DDRB,temp2      ldi temp1,0x01
>out PORTB,temp1
>
>-----------------------------------------------
>
>I know it is quite simple, but i want to begin from the simple things
>first..
>
>The problem that I have is that it simply does not work in the STK500.
>I mean, when I used an ATMEGA161 it worked perfectly.
>
>Right now with th euse of the ATMEGA162 it does NOT work.
>ANd i cannot understand why..
>
>Please help me..
>
>thanks
>
>
>
>
>
>
>
>
>SPONSORED LINKS
><http://groups.yahoo.com/gads?t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Intel+microprocessors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=2Ei2cgLXCIBwWur-MAvk3w>Microcontrollers

><http://groups.yahoo.com/gads?t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Intel+microprocessors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=sKPYCvKp-U9z4V6igOSX7Q>Intel

>microprocessors 
><http://groups.yahoo.com/gads?t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Intel+microprocessors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=rVmS-5agU32eGJuOlY4qbA>Pic

>microcontrollers
><http://groups.yahoo.com/gads?t=ms&k=8086+microprocessor&w1=Microcontrollers&w2=Intel+microprocessors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=YgKR1j2MhRY31DWVVujpZQ>8086

>microprocessor
>
>
>----------
>>Yahoo! Terms of Service.
>
>
>----------
	*                 Unemployment is not working.                  *
*****************************************************************
Jim Bacon
jwbacon@jwba...
303-666-9455 (H)
http://adams22.homeip.net
jbacon@jbac... (W)
720-494-4938 ext 329 (W) ... 720-494-9432 (FAX)
	[Non-text portions of this message have been removed]
	


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )

Re: [AVR club] please help regarding ATMEGA162 and STK500 - kkazakos2003 - Mar 7 12:16:00 2006

Hello and thanks for the reply.
I apologise but maybe I have not expressed my problem correctly.

The problem that I face with the STK 500 and the ATMEGA162 is the 
following:

I download a simple code (i want to "light" led 0 out of port b) in 
the ATMEGA 162 using the STK 500. I am waiting to see in the board ( 
after I have connected the led headers with the portb ones) the led 
0 off and all the other leds on. This is NOT working. I see all the 
leds off.SOmething which is not logical. 

If I use an ATMEGA161 it is working perfectly.

What might be going wrong?

thank you
kostas

--- In avrclub@avrc..., Jim Bacon <jwbacon@...> wrote:
>
> the STK500 hardware "inverts" the logic output of the ports to the 
> LED's on the board, such that:
> a "0" lights the LED,
> a "1" turns it off.
> 
> if that's all there is to your code, LED 0 should be OFF, and 
LED's 
> 1-7 should be ON.
> 
> ... that assumes you put jumpers from the port B pin header to the 
> LED header ...
> 
> At 08:45 AM 3/3/2006, you wrote:
> >Hello dear friends,
> >
> >I am currently new in th euse of STK500 for ISP programming.
> >I am using an ATMEGA162.
> >
> >The little thing that I am trying to do is to light a led in the 
STK500.
> >
> >My code is like this:
> >--------------------------------------------------
> >.include "m162def.inc"
> >
> >.org 0x000
> >rjmp RESET      ;external pin, power-on and watchdog reset
> >
> >.def temp1  = r16
> >.def temp2  = r17
> >
> >;--Main source code
> >
> >RESET:
> >
> >
> >ldi temp2,0xff
> >out DDRB,temp2      ldi temp1,0x01
> >out PORTB,temp1
> >
> >-----------------------------------------------
> >
> >I know it is quite simple, but i want to begin from the simple 
things
> >first..
> >
> >The problem that I have is that it simply does not work in the 
STK500.
> >I mean, when I used an ATMEGA161 it worked perfectly.
> >
> >Right now with th euse of the ATMEGA162 it does NOT work.
> >ANd i cannot understand why..
> >
> >Please help me..
> >
> >thanks
> >
> >
> >
> >
> >
> >
> >
> >
> >SPONSORED LINKS
> ><http://groups.yahoo.com/gads?
t=ms&k=Microcontrollers&w1=Microcontrollers&w2=Intel+microprocessors&
w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=2Ei2cgL
XCIBwWur-MAvk3w>Microcontrollers 
> ><http://groups.yahoo.com/gads?
t=ms&k=Intel+microprocessors&w1=Microcontrollers&w2=Intel+microproces
sors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=sK
PYCvKp-U9z4V6igOSX7Q>Intel 
> >microprocessors 
> ><http://groups.yahoo.com/gads?
t=ms&k=Pic+microcontrollers&w1=Microcontrollers&w2=Intel+microprocess
ors&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=rVm
S-5agU32eGJuOlY4qbA>Pic 
> >microcontrollers
> ><http://groups.yahoo.com/gads?
t=ms&k=8086+microprocessor&w1=Microcontrollers&w2=Intel+microprocesso
rs&w3=Pic+microcontrollers&w4=8086+microprocessor&c=4&s=100&.sig=YgKR
1j2MhRY31DWVVujpZQ>8086 
> >microprocessor
> >
> >
> >----------
> >>Yahoo! Terms of Service.
> >
> >
> >----------
> 
> 
> *                 Unemployment is not working.                  *
> *****************************************************************
> Jim Bacon
> jwbacon@...
> 303-666-9455 (H)
> http://adams22.homeip.net
> jbacon@... (W)
> 720-494-4938 ext 329 (W) ... 720-494-9432 (FAX)
> 
> 
> [Non-text portions of this message have been removed]
>
	


(You need to be a member of avrclub -- send a blank email to avrclub-subscribe@yahoogroups.com )