#avr Logs

Aug 19 2017

#avr Calendar

12:05 AM day_ is now known as daey
05:38 AM remkooo1 is now known as remkooo
08:48 AM renn0xtk9: If you want to use two ATMEGAs, communicate them with the I2C and power them with VCC=3.6 Volt, will it work ? I mean normal TTL signal are supposed to be 0, +5 V ?
09:41 AM renn0xtk9: \
09:51 AM polprog: datasheet defines high and low levels
09:52 AM polprog: you could even power them with 3.14V and it would be ok
09:52 AM polprog: however, they would not be able to handle, say, 12V TTL logic
09:53 AM polprog: atmegas are not TTL but CMOS
09:54 AM polprog: renn0xtk9:
09:55 AM polprog: in general, for atmega8l max voltage for a low state is 0.2*Vcc and min voltage for a high state is 0.8*Vcc
09:55 AM polprog: iirc that's like in every other CMOS thingy
01:44 PM renn0xtk9: I try to run two atmega 328 p with the signal clock of 1 feeding to 2 (CLKO to XCLK). The second does not seem to run. First one is running fine with a 16Mhz external crystal, and oscillos shows a nice sinusoidal frequency at approx 4MHz on CLKO of AVR1
01:45 PM renn0xtk9: on no2 I let the CKDIV 8 unprogrammed and use F_CPU 16Mhz
01:45 PM renn0xtk9: any idea whats wrong?
01:47 PM rue_shop3: did you follow the datasheet instructions
01:47 PM rue_shop3: ?
01:49 PM renn0xtk9: rue_shop3 I tried as much as I could but it is still not really clear to me what is the exact setting i should choose even after reading it
01:49 PM renn0xtk9: normally it should not be comlpicated
01:50 PM renn0xtk9: wire CLKO to XCK and programm fuse accrodingly
01:50 PM rue_shop3: they usually have an example of chaining clock sources in the datasheet
01:51 PM renn0xtk9: well here haven't found so far
01:51 PM renn0xtk9: event tutorias are prettu scarce:S
01:53 PM rue_shop3: so, you have an extranal crystal on one of them, and thats ones XTAL2 line goes to the XTAL1 of the other m328 right?
01:55 PM rue_shop3: so the mega8 has ports D, C, and B
01:55 PM renn0xtk9: rue_shop the crystal is connected on XTAL 1 and 2 of the first one, but not at all to the second one
01:55 PM renn0xtk9: I only connect the c
01:55 PM renn0xtk9: clkout of the first one to the xclk of the second one
01:55 PM rue_shop3: well, that would expain the second controller not working
01:56 PM renn0xtk9: I still have use a crystal for the second one ?
01:56 PM rue_shop3: no
01:56 PM rue_shop3: you didn't connect the clock source from the first controller to it
01:57 PM renn0xtk9: rue_shop3 not sure what you mean now, CLKO of avr1 is not supposed to be the clock source?
01:58 PM rue_shop3: no, you feed it off the ouput of the crystal osc of the first controller
01:59 PM renn0xtk9: so basically the crystal is in parralle of the both atmegas?
02:00 PM renn0xtk9: connected to xtal1 of avr 1 and 2 on one side and xtal2 to avr 1 and 2 on the other side?
02:00 PM rue_shop3: nope
02:00 PM rue_shop3: the first controller gets the crystal like normal
02:01 PM rue_shop3: the second controller is set to external clock source
02:01 PM rue_shop3: the one without the crystal has its XTAL1 wired to the XTAL2 of one with the crystal
02:02 PM rue_shop3: you likley cant drive a lot of them togethor, but 2 is pretty reasonable
02:04 PM renn0xtk9: rue_shop3 okay
02:04 PM renn0xtk9: working !
02:05 PM renn0xtk9: but what is then the xclk pin supposed to be used for?
02:06 PM renn0xtk9: it says USART external clock input/output . I thought it was precisly to put two muc on the exact same clock frequency
03:18 PM polprog: https://puu.sh/xei4o/a172d3eca7.jpg
03:19 PM polprog: 2 color led striped to the kitchen
03:19 PM polprog: white for day, red for night
03:19 PM polprog: currently running heat tests
03:19 PM polprog: :D
03:57 PM renn0xtk9: polprog what did you do with the strip ? I got kind of the same strip at home
03:57 PM renn0xtk9: do you control it with computer?
03:57 PM polprog: no
03:57 PM polprog: it's two strips on a spdt switch
03:58 PM polprog: and a power supply
03:58 PM polprog: next install will be pwm'd
03:58 PM polprog: i already have the chip
03:59 PM renn0xtk9: okay
04:00 PM renn0xtk9: I am still trying to make my Vusb-i2c-Infrared two AVR stuff, but my strip as an infrared remote. So if I manage to make it work maybe at the end I will manage to light it up from computer :p
04:03 PM day_ is now known as daey
04:04 PM polprog: that would be cool
04:05 PM renn0xtk9: indeed ^^ I first got to find out how the slave read byte from the twi
04:07 PM polprog: i never got twi to work xD
04:07 PM polprog: good luck :D
04:22 PM renn0xtk9: I seem to got it to send .. see if it can receive ^^ thks
04:22 PM polprog: so did i....
04:45 PM nucu: is someone here who can help me understand something regaring the bootloader of atmega avr's ?
04:54 PM antto: ask yer question
04:58 PM Jartza: yes, what is this "something" you need to understand?
05:01 PM nucu: Its regarding the Boot size configuration and Boot reset adress. So the bootloader is at the end of the flash memory and can be defined by fusebits to be 4 different sizes (atmega2560 in that example). The boot loader reset adress (from datasheet) are 0x1FE00 or 0x1FC00 or 0x1F800 or 0x1F000. So far so good. But when i take a look at the arduino bootloader for the 2560, i expected the hex file adresses to line up, but they dont, they start
05:12 PM Jartza: ...they start?
05:12 PM Jartza: your message was cut
05:13 PM nucu: they start at 0xE000, why is that??
05:14 PM nucu: but i figured it out by myself now :-|
05:15 PM Jartza: word-based addressing?
05:16 PM nucu: no, the hex has a limited adressing space, and at some point it switches to "Extended Segment Address Record (Typ 02)", basically a adress offset, so 0xE000 sould line up at the end (im still calculating)
05:31 PM nucu: ok, so the Extended Segment Address Record (Typ 02) means that we adress one higher bit (bitsift left) and also contains a base adress to add. 0xE000 << becomes 0x1C000 and when we add the adress wich is 3000 we end up with 0x1F000 as in the datasheet. Gn8
05:31 PM Jartza: mkay
05:32 PM antto: "mkay" doesn't sound confident ;P~
07:08 PM renn0xtk9: if I define debug=1; inside an ISR it should stay 1 outside of the ISR no?
07:08 PM tpw_rules: is 'debug' marked as volatile?
07:08 PM renn0xtk9: debug is a volatile uint8_t declared somewhre else in a header
07:08 PM tpw_rules: okay then it should
07:08 PM renn0xtk9: hmm shit
07:08 PM renn0xtk9: I place it in the ISR that should be called as soon as something happen on the TWI
07:09 PM renn0xtk9: and it seems it never go to 1 . aka the atmega does not receive anything
07:09 PM tpw_rules: then i would imagine twi is not set up correctly
07:10 PM renn0xtk9: hmm. on the oscilloscope it seems like it is sending something. Do you happen to know about a good library ? I am using this : https://github.com/g4lvanix/I2C-master-lib
07:10 PM renn0xtk9: the guy also the slave counterpart on its github
07:14 PM Lambda_Aurigae: use peter fleury's library
07:14 PM Lambda_Aurigae: although, it's master only
07:14 PM renn0xtk9: hmm I think my problem come from slave side
07:23 PM renn0xtk9: it is crazy that manufactures don't provide full featured library in C to use their stuff...
07:23 PM renn0xtk9: it is crazy that manufactures don't provide full featured library in C to use their stuff...
07:32 PM renn0xtk9: if I got add=00000010 and i do addr<<1 , then I have got 00000100
07:32 PM renn0xtk9: right?
07:37 PM Emil: yes
07:38 PM renn0xtk9: I don't understand then why the compiler says
07:38 PM renn0xtk9: firmware.c:102:2: warning: statement with no effect [-Wunused-value]
07:38 PM renn0xtk9: addr<<1;
07:58 PM Thrashbarg__ is now known as Thrashbarg
08:05 PM day_ is now known as daey
08:13 PM enh: hi
08:19 PM enh: 21:42 in the extreme east of brazil
08:37 PM day_ is now known as daey
08:42 PM enh: This looks sooo interesting: http://www.ebay.com/itm/450nm-445nm-17W-17000mW-High-power-blue-laser-module-engraving-wood-metal-goggle/232329874309?_trkparms=aid%3D888007%26algo%3DDISC.MBE%26ao%3D1%26asc%3D45728%26meid%3D9d6ae2aa676b4f67b1c125e874203de6%26pid%3D100009%26rk%3D1%26rkt%3D1%26sd%3D232340408238&_trksid=p2047675.c100009.m1982
08:43 PM Casper: as long as you don't look at it, or it don't reflect back, and you don't shine it to any flying object
08:44 PM enh: It is probably not collimated, with a small focal length.
08:44 PM enh: 17W is a lot...
08:44 PM Casper: a 100mW green pointer is enought to blind a pilot
08:44 PM enh: If I buy it, I'll install on the CNC
08:47 PM enh: If I remember well, sun intensity is around 1.30kW/m2, or 130mW/mm2
08:48 PM enh: If you consider a laser pointer beam cross section to be around 1mm^2
08:48 PM enh: a 100mW green laser pointer is almost the same as looking directly at the sun
08:49 PM enh: But it needs to arrive at the pilot's eye still collimated
08:55 PM Casper: you don't need to make it that bright
08:56 PM Casper: just bright enought that their widelly dilated pupil let enought light in to cause issue
10:01 PM JanC is now known as Guest58168
10:01 PM JanC_ is now known as JanC
10:15 PM enh: soooo silent here
10:57 PM enh: Casper?
10:57 PM enh: Just ordered: http://www.ebay.com/itm/15W-Laser-Head-Engraving-Engraver-Module-Marking-Wood-Cutting-with-TTL-Adaptor/382190710162?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649