Maker Pro
Maker Pro

AVR TINY15, calibratingbyte.

H

Harald Mossige

Jan 1, 1970
0
First lab.

reset:
sbi DDRB.0
loop:
sbi PORTB,0
cbi PORTB,0
rjmp loop


then, compile, program and scoop at PORTB,0 gives ontime of 5.3 * 0.2 us =
OK

Then I add it to be:


reset:
ldi r16,0xFF ; <- this is altered increasily by dtep of 0x10
down to 0x0f
out OSCCAL,r16

sbi DDRB.0
loop:
sbi PORTB,0
cbi PORTB,0
rjmp loop

This giv no result at the scoop.
Hvat does I wrong?


Then I add at the end:

reset:
; ldi r16,0xFF ; <- this is altered increasily by dtep of
0x10 down to 0x0f
; out OSCCAL,r16

sbi DDRB.0
loop:
sbi PORTB,0
cbi PORTB,0
rjmp loop

..org 0x3fe
..db 0x80

AStudio3.5 aksept it, but I am not able to program it since STK500 are
oppgraded to AStudio 4.

Compiling width AStudio4, I get the errormessage:

warning: offset 0x7fc in .cseg is beyond end of memory at 0x3ff
warning: end of .cseg at 0x7fe is beyond end of memory at 0x3ff
warning: .cseg .db misalignment - padding zero byte

Howto get the OSCCAL to work
Howto program the calibratingbyte at 0x03FE

HM
 
Top