Posted: Mon Aug 25, 2014 3:44 pm Post subject: attiny13 - funny division
Hi,
I cannot find correct values for HWstack and framesize.
Division is funny with these values (24&24), try it in simulator I think it is tiny13 low memory issue
If J is 11, I=(11/4)=1
J=79, I=158
It works correctly with "config timer0" line remarked but I need timer0 too...
Config Adc =Single , Prescaler=Auto , Reference=Avcc ConfigTimer0= Pwm , Prescale =1 , Compare A Pwm =Clear Up , Compare B Pwm =Clear Up
'----------------------------------------------------------------------------------------- Dim I AsByte , J AsByte '-----------------------------------------------------------------------------------------
Output1 Alias Ocr0b
Output2 Alias Ocr0a
'----------------------------------------------------------------------------------------- '----------------------------------------------------------------------------------------- Do Incr J
I = J /4 Loop End
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum