When I run a simulation and try to set OCR0A in a function and change it in a ISR the value is never copied to OCR0A, yet when I set OCR0A in the main it works just fine. Is there something I need to declare in order to make OCR0A accessible within the scope of a function or to make it global? I was thinking of using a pointer for OCR0A so that I can set it in the function, but I wasn't sure why a register would be accessible from a function. I'm using AVR Studio 4.18 SP1, ATMega88PA @20MHz. Thanks.
Joined: Tue. Feb 24, 2009
Posts: 139 View posts