#avr Logs

Jun 03 2019

#avr Calendar

01:41 AM day__ is now known as day
12:50 PM gsi__ is now known as gsi_
03:19 PM pwillard_ is now known as pwillard
04:02 PM polprog: yeah i do, youre posting some pics to twitter
04:03 PM polprog: im posting as well, fixed a fluke 73
04:03 PM mi6x3m: hey guys, I am having a bit of a PWM trouble. In my application PB0 is set HIGH without PWM, the sometime later I enable PWM such that the duty cycle is 100% and PB0 should remain HIGH
04:03 PM mi6x3m: however, there is a brief moment where it goes LOW
04:04 PM mi6x3m: and I suspect it's related to the initialization time of the PWM logic
04:04 PM mi6x3m: can anyone advise a solution?
04:17 PM polprog: i think that some tcnt registers are double buffered, also the order in which you set them will matter
04:40 PM mi6x3m: polprog: can you elaborate a bit?
04:40 PM mi6x3m: I am using a tiny uC
04:40 PM vmt: everytime you add a buffer to something, god kills a kitten
04:41 PM polprog: i suspect that there is a moment where the pwm is active but the comlare values are not set right yet
04:41 PM polprog: compare*
04:41 PM polprog: and thats why its behaving like that
04:42 PM vmt: i'd imagine the datasheet specifying this, nevermind me i'm really too lazy to be interested in this right now :)
04:42 PM mi6x3m: polprog: any trivial solution to this? i could set the timer value so a match occurs immediately upon enabling
04:45 PM polprog: that should work
04:45 PM mi6x3m: I suspect this is the same issue as https://www.avrfreaks.net/forum/manually-toggle-oc0a
04:46 PM polprog: >Use a Force Output Compare feature. See datasheet for details.
04:46 PM polprog: theres that also
04:47 PM mi6x3m: polprog: doesn't work in Free PWM mode, the spec is clear on this
04:48 PM polprog: right
04:48 PM polprog: whats your code now?
04:49 PM mi6x3m: I don't understand?
04:50 PM mi6x3m: OK, solved
04:51 PM mi6x3m: set TCNT0 = TOP
04:55 PM polprog: good
04:55 PM polprog: nighters :)
04:58 PM mi6x3m: nice
11:19 PM day__ is now known as day
11:33 PM gsi__ is now known as gsi_