i'm not sure where to drop this question as it involves all three aspects.....
i'm trying to program an atmega168p with an ISP programmer made by sure-electronics (AVR STK500 V2.0 USB ISP Programmer clone) i didn't buy direct from them but a more local supplier (Solarbotics). yes i've given up on the HC11's for now
the setup:
using a 4 AA pack i have it regulated down to 5 V. The only things I have hooked up to the IC are Vcc (5V), Gnd (pins 8 & 21), Aref (5V), AVcc (5V), a 8.0 MHz crystal (with 2 22pF caps to gnd), 12K pull up resistor on reset (pin 1) and the 6 pin ISP programmer pins.
i found out the programmer will not work with studio 5 so i loaded on studio 4.19 (build 730).
It does detect as a stk500 and will get some info from my breadboarded circuit but is still doing this:
Getting isp parameter.. SD=0x03 .. OKOKOK
Reading FLASH input file.. OK
Reading EEPROM input file.. OK
Setting mode and device parameters.. OK!
Entering programming mode.. FAILED!
Leaving programming mode.. OK!
Do i need to setup the studio 4 programming wizard with the right .hex files or are they auto loaded after a successful build?
Do I need to upgrade the firmware on the programmer?
The programmer does have a open spot on the bottom of the case that I could insert a couple of pins but I'm not aware of what it would do so I didn't try it either. I do know that the unit will not auto load a firmware upgrade as the programmer needs to be in a boot mode or some such.
oh and here is the code: (sorry C kids it is in assembler)
.include "m168pdef.inc"
.def Temp = R16 ;Gives "Defines" Register R16 the name Temp
.org 0x0000 ;Places the following code from address 0x0000
rjmp RESET ;Take a Relative Jump to the RESET Label
RESET: ;Reset Label
ldi Temp, 0xFF ;Store 255 in R16 (Since we have defined R16 = Temp)
out DDRB, Temp ;Store this value in The PORTB Data direction Register
Loop: ;Loop Label
out PORTB, Temp ;Write all highs (255 decimal) to PORTB
dec Temp ;Decrement R16 (Temp)
rjmp Loop ;Take a relative jump to the Loop label
just trying to light up some LEDs for a first go at these newer micros and hitting the proverbial wall. been beating my head against it for the last few days and finally decided to give a shout out for help.
any kick in the right direction will do. should note that my experience using studio 4 is pretty much limited to this weekend's frivolities, i was used to using dos based assembler compilers for old microcontrollers, but windows 7 is not DOS friendly.
thanks,
-Chris