#avr Logs

Apr 29 2020

#avr Calendar

05:10 AM day_ is now known as day
09:49 AM mark4: lol notice how AVR has an irc following but PIC and PIC32 dont!
09:58 AM nohit: i havent thought about that
09:58 AM nohit: there must be a pic channel
09:59 AM mark4: i couldnt find one :)
09:59 AM mark4: im actually doing some PIC32 stuff for work (at home because of zombie apocalypse).
09:59 AM mark4: and i am almost finished wriing my own PIC32 asssembler
10:09 AM nohit: nice
10:10 AM mark4: in forth :P~
10:10 AM mark4: of course but you guys already knew that :P
12:06 PM polprog: i think there was a #microcontrollers
12:06 PM polprog: there is on dalnet
12:07 PM polprog: iirc #microcontrollers here are dead
12:42 PM cehteh: the pic32 toolset is just crap and never attracted much free software devs
01:02 PM polprog: iirc the only free compiler for pics is sdcc which doesnt support all the pic14* and 16* -s
01:09 PM nohit: was there a restricted version at some point ?
01:10 PM nohit: i think i remember that the free version of pic compiler was only limited to certain optimization setting
01:10 PM nohit: or something like that
01:25 PM polprog: i never done pics
01:25 PM polprog: wait, i actually did
01:25 PM polprog: i got that free dev board from microchip
01:25 PM polprog: with a PIC-something
01:26 PM polprog: it's nice
01:26 PM polprog: ive wrote a blinky and put it in the drawer
01:26 PM polprog: but it's a nice board
01:27 PM polprog: funny thing happened today, i found an STM8 mcu in a chinese DCDC converter module
01:28 PM nohit: that's a first :D
01:29 PM nohit: never seen one in actual use
02:20 PM polprog: same, lol
02:20 PM polprog: i have a dev board. weird little cisc
02:29 PM [1]MrMobius is now known as MrMobius
03:44 PM nohit: i actually havent even seen a stm8 ever
03:45 PM nohit: and probably never will
03:45 PM nohit: i think they keep making them, but not designing new ones
03:47 PM nohit: they have this longevity guarantee
07:13 PM Smidge204: So after thinking about what was discussed a few days ago, I feel I can adequately multiplex four buttons onto a single pin using the ADC to trigger an interrupt; http://tinyurl.com/yan99onu
07:14 PM Smidge204: Which if that proves to be reliable, actually gives me one more button than before, which I could use to sneak in a programming mode
07:16 PM cehteh: probably you can do that with many buttons more, as long no one pushes 2 buttons at the same time :D
07:17 PM cehteh: do you really need an interrupt or can you poll it?
07:22 PM Smidge204: Power consuption is at a premium so I'm hoping to use a low power sleep mode most of the time
07:24 PM Smidge204: How many buttons I can multiplex will depend on how repeatable the ADC is I suppose. Dividing the ref voltage into 4ths was easy and gives pretty large windows for noise and errors
07:25 PM cehteh: how do you get the interrupt?
07:26 PM cehteh: thats more the tricky part .. and whats the goal? preserve battery?
07:26 PM cehteh: because the adc needes some power
07:31 PM Smidge204: Ah sorry, I means the AC
07:34 PM Smidge204: The AC can trigger an interrupt on rising/falling/both edges, and has alow power mode
07:35 PM Smidge204: So a button press causes a change in input, triggering an interrupt, and part of the ISR wold be to use the ADC to sample the voltage and determine which button was pressed
07:38 PM cehteh: ah thats what i wou'dve recommend
07:38 PM cehteh: still might be bit unreliable because of bouncing
07:39 PM Smidge204: I'm thinking the ADC's sample-and-hold operation might help with that
07:41 PM cehteh: actualy the opposize
07:41 PM cehteh: because the window where it samples is only one ADC clock iirc
07:42 PM Smidge204: hmm
07:42 PM cehteh: and when you turn the ADC on it needs dew more cycles on for the first conversion AND the first few conversions might be not reliable, see datasheet
07:42 PM cehteh: when you can, put an RC filter in front
07:43 PM Smidge204: "The ADC supports sampling in bursts where a configurable number of conversion results are accumulated into a single ADC result (Sample Accumulation)"
07:44 PM Smidge204: If I understand that right, it can be set to take X samples and average them
07:46 PM cehteh: ah moment new -0 -1 series?
07:47 PM cehteh: -> completely different beasts
07:47 PM Smidge204: =Ye
07:47 PM Smidge204: Tiny814
07:48 PM cehteh: ok
07:48 PM Smidge204: So much to learn! There's also a capacitive touch controller built in though I don't have enough pins to use that here
07:50 PM cehteh: ok .. and i am out .. cu