#avr Logs

Sep 29 2019

#avr Calendar

02:16 AM [spectre]: hello
02:45 PM soreau: I think I am getting reliable data with bluepill as speaker now but no way to listen to it without DAC
02:58 PM cehteh: well done plan :D
02:59 PM cehteh: mabe you can use it for pwm or deltasigma waveform output
02:59 PM cehteh: at least pwm should be feasible
03:00 PM vmt: nah, do 2-r2
03:00 PM vmt: r-2r even
03:00 PM cehteh: should work as well
03:01 PM cehteh: deltasigma would be favorable but i think that stretches the capabilities a bit :D
03:01 PM vmt: well i mean for a testing solution before getting a proper dac
03:01 PM cehteh: r2d2 :)
03:01 PM vmt: star wars suck
03:02 PM vmt: sttng > b5 > ... > star wars
03:02 PM cehteh: havent seen any of the new films
03:02 PM cehteh: :)
03:02 PM vmt: me neither, but the old ones suck just as bad
03:02 PM cehteh: they where entertaining at least
03:03 PM cehteh: but i like the pre-space-opera scifi flicks from the 60's and early 70's more
03:04 PM vmt: STTOS is pretty much space opera and it's complete bollocks... and it's from the 60s
03:04 PM cehteh: STTOS is?
03:04 PM cehteh: ah orgiignal
03:04 PM vmt: star trek the original series
03:05 PM cehteh: i meant more things like silent running, logans run, westworld etc
03:05 PM vmt: hmm. haven't seen any of those, i haven't seen old sci-fi a lot to begin with
03:05 PM cehteh: oh, must watch
03:06 PM vmt: i feel like modern sci-fi 9/10 times gets into some psychological mumbojumbo, so i don't watch much of that either
03:06 PM cehteh: tose 3 above are pretty different in setting and story
03:07 PM vmt: so the westworld series is a remake of that? I've heard of the story
03:07 PM cehteh: yes, dunno theat remake, can only be bad :D
03:08 PM vmt: myeah, i heard there's anthony hopkins, who's one of my favorite actors however, i don't really watch series
03:09 PM cehteh: logans run got a remake in the 2000's dunno the title, neither i have seen it
03:09 PM vmt: i'll check it out one of these days
03:10 PM vmt: oldest sci-fi flick i've seen i guess would be soylent green, people seem to appreciate the movie but i didn't really like it
03:11 PM cehteh: mhm well maybe then the ones above are not your taste :D
03:11 PM vmt: well i think soylent green is an average movie with a predictable plotline
03:12 PM vmt: it is entertaining, though
03:13 PM vmt: though wait no. soylent green is '73. what the hell, i thought it was 20 years older
03:13 PM vmt: okay, never mind then. been a while since i saw it.
03:13 PM cehteh: buck rogers :)
03:14 PM cehteh: ah no that was later as well
03:14 PM vmt: also, i really don't like 2001
03:14 PM vmt: i've gotten a lot of flak for that:D
03:15 PM cehteh: have you seen 'Moon'
03:17 PM vmt: yeah
03:18 PM vmt: moon is probably my favorite of the more recent sci-fi films i've seen
03:18 PM cehteh: same here
03:29 PM joakimk: I'm playing around with an ATMEGA16 and an ESP8266. I've managed to set up the ESP to communicate with the AVR (through serial), and connect to the ESP from my PC over TCP. The AVR uses an interrupt (Timer1) to blink some LEDs, and I want to transmit a byte (char) containing the "tempo" of the blinkin (i.e. the TCNT1).
03:30 PM joakimk: Some basic questions here: If the tempo is received as a char, what's the range -- I mean, what's the largest number I can send in one char?
03:32 PM vmt: so primary school math lesson commences...
03:32 PM joakimk: hehe
03:33 PM vmt: joakimk: so, how many bits in a char?
03:33 PM joakimk: It's just the AVR stuff is quite complicated (to me), so I tend to get confused with the basics :)
03:33 PM joakimk: is it 2^7 simply?
03:33 PM polprog: no, 2^8 for unsigned
03:33 PM polprog: 256
03:34 PM vmt: 2^8-1
03:34 PM polprog: yes, 0 to 255
03:34 PM joakimk: yes, if unsigned. OK :)
03:34 PM polprog: 256 unique values
03:34 PM vmt: and you want it unsigned
03:34 PM joakimk: right
03:35 PM vmt: and the signedness of the data is nothing but representation. the actual data doesn't change.
03:35 PM polprog: yes. in fact its all just a bunch of bits in the memory. how you interpret it in your program is up to you
03:36 PM joakimk: so -- and again, sorry of the basic questions, but is there any reason for me to set up the "receive buffer" (array) as a char array, or can it just as well be an int array (unsigned, in both cases)?
03:36 PM vmt: consider what has just been said
03:37 PM polprog: use whatever results in simpler code
03:37 PM polprog: need to transmit 8 bit values? use uint8_t (or char)
03:37 PM polprog: 16 bit? uint16_t (i dont remeber whats the non-stdint type that is 16 bit on avr)
03:37 PM vmt: personally i like float arrays for u8 data
03:37 PM polprog: lol
03:38 PM vmt: in essence, it doesn't matter. you just have to account for the sizes of the data types
03:39 PM vmt: and you'll find these in the compiler documentation for your specific platform. however, using (u)intx_t is simple
03:39 PM joakimk: so if the payload is always 8 bit numbers, it should be an array of uint8_t
03:39 PM vmt: no, it doesn't matter.
03:39 PM polprog: but that is the simplest way
03:40 PM vmt: you can have it be u/int32_t, just that for every element you can fit 4 u/int8_ts
03:41 PM joakimk: ok thanks :)
03:43 PM vmt: also is this like a common stinkpad thing or is this a loonix driver thing
03:43 PM vmt: when you hold down a key it freezes the trackpad
03:45 PM polprog: might be a stinkpad option to prevent errorneous trackpad input from moving your hand over the keys
03:45 PM polprog: there is something like that
03:46 PM vmt: hmm. maybe. though it does a good job not registering input from palms in any case