yang52523 发表于 2007-8-23 16:25:59

ATmega88 定时器1

用T/C1准确定时200ms,但出现这种情况:error: Operand 1 out of range: 0x80等之类的错误提示

无法编译,用的是CTC模式,程序如下:

             RALLY1: CLI

                     CLR TEMP

OUT TCCR1A,TEMP

LDI TEMP,0x0D

OUT TCCR1B,TEMP

LDI TEMP,0x02

OUT TIMSK1,TEMP

LDI TEMP,0x02

OUT OCR1AH,TEMP

LDI TEMP,0xBB

OUT OCR1AL,TEMP

         RE1: SBIS TIFR1,1

                     RJMP RE1

RET

希望有人解答一下,有没有此类的QQ讨论群啊,望告之,多谢!

machao 发表于 2007-8-23 22:43:16

For I/O Registers located in extended I/O map, “IN”, “OUT”, “SBIS”, “SBIC”, “CBI”, and “SBI”

instructions must be replaced with instructions that allow access to extended I/O. Typically

“LDS” and “STS” combined with “SBRS”, “SBRC”, “SBR”, and “CBR”.

yang52523 发表于 2007-8-24 08:44:42

多谢马老师!
页: [1]
查看完整版本: ATmega88 定时器1