AVR STUDIO6 eeprom文件编译后没有
我写了一个汇编程序,在eseg写了八个字节,怎么编译后没有.eep文件?我使用的是AVRSTUDIO 6,程序如下:;LED Patterns: Illustrate reading of EEPROM data to control LED's
;This program uses pushbuttons (PORT D) to select an address
;in EEPROM. The byte at this address is displayed on the LED's (PORT B).
;PORTB must be connected to the LEDS
;PORTD must be connected to the SWITCHES
;Programmer: ZJ
;Date:3/2014
;Platform:STK-100
;Device: ATmega16A
;This include file has all of the I/O addresses already defined via appropriate equ directives.
;already defined via appropriate equ directives.
;.include "m16adef.inc",this is already include by AVRSTUDIO6, it's name is m16Adef.inc
.cseg ;select current segment as code
.org 0 ;begin assembling at address 0
.def leds = r16 ;current led state
.def switches = r17 ;switch values just read
.def temp = r18 ;used as a temporary register
ldi temp, 0xFF ;configure PORTB as output
out DDRB, temp ;
clr temp ;configure PORTD as input
out DDRD, temp
ldi leds, 0xFF ;Initialize LED's all off
out PORTB, leds ;Display initial LED'S
;wait for switch to be pressed
;this will occur when one or more switches are depressed
waitpress:
in switches, PIND
cpi switches, 0xFF ;0xFF means none pressed
breq waitpress
;one or more switches are pressed (0's)
;use this as an address into EEPROM (but flip bits first)
com switches
clr temp
out EEARH, temp ;high bit of address is 0
out EEARL, switches ;low byte of address is in switches
sbi EECR, EERE ;request a read of EEPROM
in leds, EEDR ;data is returned in EEDR
out PORTB, leds ;(Re) display LED's
;wait for all switches to be released
waitrelease:
in switches, PIND
cpi switches, 0xFF ;0xFF means none pressed
brne waitrelease
rjmp waitpress ;repeat(forever)
;Define EEPROM data
.eseg
;set origin (address) then define byte
.org 1<<0 ;for switch 0
.db 0b00001111
;set origin (address) then define byte
.org 1<<1 ;switch 1
.db 0b11110000
.org 1<<2 ;switch 2
.db 0b10101010
.org 1<<3 ;switch 3
.db 0b01010101
.org 1<<4 ;switch 4
.db 0b10000001
.org 1<<5 ;switch 5
.db 0b00011000
.org 1<<6 ;switch 6
.db 0b11100111
.org 1<<7 ;switch 7
.db 0b01111111
页:
[1]