#avr Logs

Nov 08 2018

#avr Calendar

03:28 AM kakimir: 0xefbe, /* don't use the first 2 bytes as these could be overwritten in rare cases */
03:32 AM kakimir: why would you write that value to first eeprom bytes
03:32 AM kakimir: int16_t type
03:32 AM kakimir: not just 0 or something
05:51 AM kakimir: if I do EEMEM variable
05:51 AM kakimir: does programmer write those initial values to eeprom?
05:56 AM Thrashbarg: nope they need to be extracted from the elf binary to a separate hex file, which can be written when writing the flash memory
05:57 AM Thrashbarg: https://github.com/takeshinoda/avr-test/blob/master/Makefile
05:57 AM kakimir: could programmer just use .elf?
05:57 AM Thrashbarg: that Makefile will do it for you
05:57 AM Thrashbarg: no
05:57 AM kakimir: oh there is eeprom write stuff in makefile
05:57 AM kakimir: nic
05:58 AM kakimir: what is the difference between write block and update block?
05:58 AM kakimir: update performs read first and conditionally write?
05:59 AM kakimir: and write just writes no matter what?
06:12 AM kakimir: okay my chip doesn't even have eeprom
06:12 AM kakimir: but anyways
06:12 AM kakimir: in two days I get update to my development board
06:12 AM kakimir: attiny44A - then I have eeprom
06:29 AM kakimir: would you return (uint8_t)1 or (int8_t)-1 for an error?
06:29 AM kakimir: I think (uint8_t)1 could be better size optimized?
06:39 AM kakimir: (uint8_t)1 selected
08:33 AM skz81: <kakimir> would you return (uint8_t)1 or (int8_t)-1 for an error? >> doesn't change anything actually. Only the actual value of the byte return (1 or 0xFF)
08:33 AM skz81: returned* even
08:35 AM vishwin60 is now known as vishwin
08:56 AM kakimir: hey another question
08:57 AM kakimir: is it better to use inverted fast pwm
08:57 AM kakimir: just invert value to been set to compare register
08:57 AM kakimir: I remember there was some tricks involving PWM
08:58 AM kakimir: I think I did some conditional change from PWM to normal GPIO output in some code because of that
09:43 AM logithack: is PORTB |= (1 << PB5); the same as PORTB |= (1 << 5); ?
09:44 AM cehteh: depends on what PB5 is defined too
09:45 AM cehteh: usually yes, but there is some extra layer of abstraction to make this portable, so prefer to use PB5
09:46 AM cehteh: LeoNerd: how does this tindy thing work, do you have any influence on availablility/production of devices there, do they produce on demand or what?
09:48 AM * cehteh things about using a 328pb board for a customer, 2-3 for prototyping now, some more later
09:48 AM logithack: cehteh: i've found this header file on the internet: https://pastebin.com/ntqjhcQ8 for example, take a look at line 18. ZEILE2 means ROW2. they put PORTB |= (1 << PB0); i thought (x << y) means that x will be shifted from right to left y times. how do i know what PB0 is?
09:49 AM cehteh: the board definitions define that somewhere you #include them (makes me wonder that this header doesnt already do that)
09:50 AM cehteh: #include <avr/io.h> .. with proper compiler flags
09:55 AM LeoNerd: cehteh: tindie is just an online marketplace.. they just handle orders and money and so on. All the actual making and shipping is done by me
09:55 AM cehteh: ah
09:57 AM cehteh: how much provision do they get? aka can i ask you directly when i need these boards?
09:59 AM LeoNerd: Yah; just ask me in advance and I can build more and bump the stock level up
10:00 AM cehteh: ok, not sure yet we are just evaluating
10:11 AM logithack: cehteh: from what i understand, youre saying that for PORTC |= (1 << PC0); the result depends on what PC0 is defined as, right? where can i see what it is defined as? i cant see any #define PC0 ... in any of my files.
10:15 AM cehteh: try rgrep '#define PC0' /usr/lib/avr/include/
10:16 AM cehteh: thats all the machinery of the avr-libc
10:27 AM logithack: cehteh: thanks for the hint, everywhere its defined, its defined with the value 0
10:27 AM cehteh: yes
10:27 AM logithack: so PC0 = 0, PC1 = 1, etc.
10:27 AM cehteh: still for reasablility and portability just use the PB names as everyone does
10:27 AM logithack: so PORTC |= (1 << PC0); is equivalent to PORTc |= (1 << 0);
10:27 AM logithack: PORTC*
10:36 AM cehteh: now find out what PORTC is defined to and write that there :D
11:46 AM merethan_w: Fuck Windows met die fucking reboots. man man.
11:47 AM * merethan_w @work, OS keuze niet de mijne
11:47 AM merethan_w: lol oops wrong channel
12:06 PM Ameisen: you and your swamp germa
12:06 PM Ameisen: german
12:06 PM Ameisen: which also looks like swamp old english
12:09 PM Ameisen: "Fucce Windows mid þam fuccenne rebooten. mann mann."
12:11 PM Ameisen: "@werc, OS ceosan na min"
12:11 PM Ameisen: though I guess swamp old english would just be Old East Anglic...
12:13 PM merethan_w: Well my swearing was in a germanic language Ameisen, but it was not German ;)
12:14 PM Ameisen: well, it was clearly swamp german
12:14 PM Ameisen: aka dutch
12:14 PM Ameisen: :)
12:15 PM Ameisen: as opposed to flat german, hill german, mountain german, taller mountain german
12:15 PM Ameisen: and island german
12:15 PM Ameisen: and cheesy german
12:16 PM Ameisen: mountain german and taller mountain german are, of course, scientific distinctions.
12:18 PM nabil__ is now known as nabil
06:55 PM rue_mohr: its nin spek duetch
08:49 PM eadthem: any issues with using a ADC bank pin for digital input (Very low speed) while using other pins for ADC in prob 240 SPS
11:48 PM day__ is now known as day