hi,
i am try to run the timer0 in the atmega16, but there is no increment on the TCNT0 register, i am using oshonsoft avr simulator. if any other needs in the code?
my code is given below
hi,
#include <avr/io.h>
#include <avr/interrupt.h>
these header files are included. and the timer is working with avr studio simulator but not working with oshonsoft simulator. and also the increment in the TCNT0 register
is twice ie, 0,2,4,6,......etc. what is the problem .
The presented code assigns some values to the registers and the code is the same in C and basic, I have no idea about sei(), this is defined in winavr but I don't know if it is also defied in the oshonsoft compiler.
I'm also nor sure if the shift operator can be used in basic.
hi,
#include <avr/io.h>
#include <avr/interrupt.h>
these header files are included. and the timer is working with avr studio simulator but not working with oshonsoft simulator. and also the increment in the TCNT0 register
is twice ie, 0,2,4,6,......etc. what is the problem .
and you don't get an error or a warning for the includes that don't exist in oshonsoft or the sei() function?
You can't copy/paste the C code to a basic compiler.
Alex, I think he means that he's using AVR Studio for compiling and Oshonsoft for simulation. The first thing that tells me this is that there are semi-colons at the end of each line. BASIC doesn't require that. Also the use of parantheses {}. BASIC doesn't use these but instead uses words like "end if", "wend", etc