#avr | Logs for 2016-08-19

Back
[05:43:08] <lwlvl> hey everybody!
[05:43:35] <lwlvl> why doesn't this timer-interrupt work? (normally it should light up a red led) https://pastebin.com/vBBZbBJu
[05:43:48] <lwlvl> this is my first time to timers....
[07:47:00] <lwlvl> why isn't my port being changed, when I call the command from an ISR-routine? doesn't the ISR-route have access to the port-registers?!
[07:47:20] <jacekowski> yes
[07:47:26] <jacekowski> it does
[07:51:17] <lwlvl> jacekowski, when I set a counter-variable (incrementing) in the ISR-function, and then check the value in the main-loop, I see that the ISR-function is invoked frequently...
[07:51:51] <lwlvl> jacekowski, but when I try to set the PORT directly in the ISR-func, nothing happens....strange...I can pastebin the code for review... (not large, only a few lines...)
[07:54:13] <lwlvl> jacekowski, https://pastebin.com/2X4XjKcF <--- no idea why this isn't working....in comments you see the technique with the couter-variable....
[08:00:22] <CORDIC> lwlvl: There is no description in the paste! Nor here!
[08:00:31] <CORDIC> Of the problem.
[08:01:12] <CORDIC> I can only guess that You wanted ``LED_PORT ^= _BV(LED_PIN)''.
[08:13:29] <lwlvl> CORDIC, I want to switch on the LED when the ISR-routine is launched....(and have it staying on)
[08:14:42] <CORDIC> k
[08:15:20] <lwlvl> CORDIC, but nothing happens.....I can't understand - why.
[08:17:42] <CORDIC> LEDs are usualy connected such that they are on when pin is low.
[08:21:39] <lwlvl> CORDIC, i assembled it personally. they have to be on when the pin is high. It's also tested....
[08:22:00] <lwlvl> I can set the pin high and they're on.
[08:22:34] <lwlvl> it simply doesn't work in the ISR-routine....and I'm interested in the why. because that's very basic....
[08:37:25] <CORDIC> lwlvl: Which device?
[08:39:34] <lwlvl> CORDIC, atmega8
[09:41:21] <jacekowski> lwlvl: can you upload the hex file somewhere as well
[09:42:29] <jacekowski> lwlvl: it sounds more like gcc optimiser issue than anything else
[19:46:37] <theBear> ffs mouse
[19:47:28] <Lambda_Aurigae> I have one.
[19:47:33] <Lambda_Aurigae> a free flow server mouse that is.
[19:47:45] <Lambda_Aurigae> although, it's just a plain dell usb mouse connected to a free flow server.
[19:47:53] <Lambda_Aurigae> but it has a Xerox Free Flow logo stuck to it!