#avr Logs

Aug 25 2017

#avr Calendar

12:07 AM _ami_: how to know if OV7670 camera module is with FIFO or without FIFO?
12:10 AM _ami_: https://www.aliexpress.com/item/1pcs-OV7670-camera-module-Supports-VGA-CIF-auto-exposure-control-display-active-size-640X480/32715365544.html
12:10 AM _ami_: is it one with fifo?
01:26 AM Kermit is now known as Guest61245
02:13 AM day_ is now known as daey
03:45 AM crib- is now known as crib
05:34 AM lemm|ngs is now known as lemmings
05:39 AM HelloShitty: Hello everyone
05:49 AM rue_bed: they are all asleep
05:49 AM rue_bed: and thats where I'm going
06:10 AM Gerritjan: i have build a pca9685 c++ controller build but when i send the pulse to the pca hat and requesting the value that has been writen to the pca hat its always the same how is that possible
06:20 AM HelloShitty: Who's around to help me
06:20 AM HelloShitty: ?
06:20 AM HelloShitty: I'm reading the datasheet of AtMega328P
06:20 AM HelloShitty: to learn how to use the ADC pins
06:20 AM HelloShitty: PORTC of mega328 has only 6 pins while other ports has 7 pins
06:21 AM HelloShitty: right?
06:39 AM Emil: Sup
06:39 AM Emil: HelloShitty: so what you need to know
06:39 AM Emil: is that you really only care about the register descriptions
06:39 AM Emil: and they are god tier for AVRs
06:44 AM HelloShitty: I was trying to understand how to setup the ADC
06:44 AM HelloShitty: I'm going to use ADC0 and ADC1
06:44 AM HelloShitty: and I thought we need to set those pins as input pins
06:44 AM HelloShitty: but looks like it's not needed
06:45 AM HelloShitty: I was also reading some tutorial and I see that mega328p has a PORTC with only 7 pins and not 8 as usual on othe rports
06:46 AM HelloShitty: Emil: I also need an explanation about what is the prescaler, why there is the need of this functionality and how it works, if possible
06:46 AM Tom_L: maybe reset takes one of those
06:46 AM HelloShitty: I never understood this feature
06:46 AM HelloShitty: Tom_L: Reset is PC6
06:46 AM HelloShitty: I can't find any PC7 in this uC
06:47 AM Tom_L: prescalar is a clock divider to the timers
06:47 AM HelloShitty: But why and what for that is needed?
06:47 AM HelloShitty: For instance, I'm using an external crystal of 16Mhz
06:48 AM Tom_L: to scale the clock for different putposes
06:48 AM HelloShitty: the datasheet has a table that varies this prescaler factor from 2 to 128
06:48 AM Tom_L: not everything has to or will run at 16mhz
06:48 AM HelloShitty: ah ok
06:48 AM HelloShitty: I think I see now what that is used for
06:49 AM HelloShitty: and how do I know which scaler factor ADC needs?
06:59 AM HelloShitty: Ok Emil
06:59 AM HelloShitty: That cap that LeoNerd spoke yesterday
07:00 AM HelloShitty: was to palce between AREF pin and +5V DC, right?
07:24 AM Emil: No
07:24 AM Emil: AREF and GND
07:25 AM Lambda_Aurigae: AREF should be tied to VCC in most cases with the capacitor between AREF and GND as close to the chip as possible.
07:25 AM Lambda_Aurigae: AREF really should be tied to an isolated reference voltage in an ideal situation...but,,nobody has that.
07:26 AM Lambda_Aurigae: ardweeny boards usually just tie it to VCC and often don't even have the cap on them.
07:28 AM Lambda_Aurigae: and don't forget to tie AVCC to VCC and decouple that with a cap to GND too.
07:30 AM Lambda_Aurigae: the datasheet shows putting a 10uH inductor between VCC and AVCC even for smoothing and filtering.
07:34 AM Lambda_Aurigae: but don't tie AREF to VCC if you are going to use internal reference voltages...just put the decoupling cap on it.
07:34 AM Lambda_Aurigae: lots of things to consider in there...
07:52 AM Emil: Lambda_Aurigae: stop
07:53 AM Emil: Lambda_Aurigae: read the datasheet
08:04 AM tehBear is now known as theBear
08:14 AM HelloShitty: ok, guys
08:14 AM HelloShitty: and about selecting the ADC pins to use
08:15 AM HelloShitty: I want to use ADC0 and ADC1
08:15 AM HelloShitty: Datasheet says for ADMUX register
08:15 AM Emil___ is now known as Emil_
08:15 AM HelloShitty: the 4 LSB
08:15 AM HelloShitty: define it
08:15 AM HelloShitty: for instance, to use ADC0, we set those 4 bits all to 0000
08:16 AM HelloShitty: if I want to sue ADC1, set those bits to 0001
08:16 AM Emil: Yes we know
08:16 AM HelloShitty: what about if I want to use ADC0 and 1?
08:17 AM HelloShitty: ADC0 and ADC1, how should I set the bits?
08:17 AM Emil: It's a mux. You have only one ADC
08:17 AM Emil: You change the mux to measure another channel
08:18 AM HelloShitty: But how is that done?
08:19 AM Emil: Exactly as the datasheet indicates
08:19 AM HelloShitty: Where?
08:25 AM HelloShitty: I can only see something about channels in 24.5.1 - ADC Input Channels, but in this piece of text, it's not described how and where the channels are changed! Only a general dsecription
08:31 AM cehteh: search for MUX
09:15 AM NoHitWonder__: i wanna make a device/software that lets me write sms messages on my pc
09:16 AM NoHitWonder__: it sucks to write messages on touch keyboard
09:18 AM Emil: NoHitWonder__: There are many apps that can do that iirc
09:20 AM polprog: any GPRS modem can send texts
09:20 AM polprog: you can connect to it via serial
09:20 AM polprog: and issue AT commands
09:21 AM Emil: polprog: if he already has a phone
09:21 AM Emil: It's silly to make another one
09:21 AM polprog: lol
09:22 AM polprog: i was thinking
09:22 AM polprog: VNC to the phone
09:22 AM polprog: and here it is, android VNC server
09:22 AM polprog: https://play.google.com/store/apps/details?id=org.onaips.vnc
09:22 AM polprog: you just need to root ot
09:22 AM polprog: s/ot/it
09:27 AM NoHitWonder__: actually i have arduino gprs shield
09:27 AM NoHitWonder__: havent tested it ever
09:29 AM NoHitWonder__: "arduino gms shield"
09:29 AM theBear: it's been years, but long ago there was ONE droid vnc server that worked remotely properly/usefully, and pretty sure it left the market due to disinterest/lack of currency, tho it still out there... it'd be nice to think that there was at least one current working implementation tho
09:29 AM NoHitWonder__: hmm i could just plug this to an arduino and use that
09:30 AM NoHitWonder__: and make some GUI with Qt
09:31 AM theBear: mmm, non-platform-specific and all kinds of open, /me approves of the gui with the qt
09:38 AM Emil: I'd probably make it a web app
09:38 AM Emil: Easier to update and code
09:38 AM Emil: has a clear api
09:38 AM Emil: everyone has a browser
09:38 AM Emil: Backend can run locally of course
09:44 AM theBear: oh, i just read the original question/idea... for reference pretty sure texts are easy to send via shell/terminal in droidland (no root required), also that there are web-services (generally a few per country/"trunk" area) that can not only send sms's but very competetive prices (with prepaid credit/signup) but often do it from arbitrary source "address"es, ya know, like how telcos and BIG companies can send text messages that look like they came from an
09:44 AM theBear: arbitrary name/number vs the source like standard gsm/phone-generated txatg
09:49 AM NoHitWonder__: yeah
09:49 AM NoHitWonder__: but i want my own gui
09:49 AM NoHitWonder__: and own number
09:50 AM Emil: NoHitWonder__: then download one of those apps that let you do it
09:51 AM theBear: not that i advocating, just informing generally, you can of course use (at least some of) said services to set "arbitary source name/number" to match a real one (of your own)
09:59 AM nabil: I think you can use the python qt package
09:59 AM nabil: and use pyserial to interface with the mcu
10:01 AM nabil: I read you wanted to write sms from your computer
10:01 AM nabil: another option is to use a usb modem
10:01 AM theBear: as i had made-obvious to me by a magazine recently, in many cases a webpage/html based interface makes even more sense when phones come into things... not only you got all that browsers-are-universal kinda stuff, but it's trivially easy to send/receive all kinds of html/http stuff from all phones, tho naturally droid ones more than others <grin>
10:01 AM nabil: like huawei's, you can write a simple script to interface with it as well
10:02 AM theBear: ooh good call... those (at least the older ones i seen up close) are basically a gsm<>uart<>usb all in one neat package\
10:02 AM nabil: yes
10:02 AM theBear: and usually with a usb2 or faster micro-sd reader for bonus points
10:03 AM nabil: yes and you can get lci and cid for geolocation as well
10:03 AM nabil: but it isn't as precise as gps
10:03 AM nabil: but still good for some applicatiosn
10:03 AM theBear: mmm, noted
10:07 AM nabil: and if your goal is to build more of a professional looking usb device, then you should consider using V-usb
10:08 AM nabil: although I'd suggest using avr toolchain for developpement
10:08 AM nabil: directly
10:09 AM bss36504: "professional USB"..."Using V-USB"
10:09 AM bss36504: top kek
10:10 AM nabil: I factored developpement time as well
10:10 AM Emil: nabil: wat
10:10 AM Emil: nabil: are you seriously saying that
10:10 AM bss36504: Nothing screams professional USB like USB 1.0
10:10 AM Emil: if one wants to make a professional looking usb device, they should use v-usb?
10:11 AM Emil: Or are you saying that one should negatively consider using v-usb
10:11 AM nabil: What's wrong with v-usb?
10:11 AM Emil: holy shit
10:11 AM Emil: nabil: you are just trolling, right?
10:11 AM Emil: All my sides
10:11 AM Emil: absolute top keke
10:12 AM theBear: technically v-usb is soft, as opposed to something awesome and locally-written like lufa, which just feeds the hw usb stack in real-usb capable avrs
10:13 AM Emil: No one should use vusb unless absolutely pushed for it
10:13 AM Emil: s/for/to/
10:13 AM nabil: He was using arduino and arduino ide, so I suggested something simple
10:14 AM Emil: You mean NoHitWonder__ ?
10:14 AM nabil: yes
10:15 AM Emil: nabil: you lack context
10:15 AM Emil: But it's fine
12:16 PM remkooo1 is now known as remkooo
01:16 PM NoHitWonder__ is now known as Tylak
01:17 PM Tylak is now known as NoHitWonder
01:31 PM remkooo1 is now known as remkooo
02:06 PM enh: hi people
02:07 PM enh: all right?
02:12 PM Emil: Nah
02:12 PM Emil: We are all död
02:23 PM enh: d"od?
02:23 PM enh: död?
02:59 PM polprog: todays programming in electronics course turned out very nice
02:59 PM polprog: we have workstation with ubuntu and will be programming atmega8s in avr-libc
02:59 PM polprog: so not arduino
03:05 PM Emil: polprog: https://emil.fi/avr ;)
03:10 PM polprog: a bit more
03:10 PM polprog: if i can make a point to that guide
03:11 PM polprog: USBASP header doesnt have pin 1 marked
03:11 PM polprog: i should set up wordpress somewhere
03:11 PM polprog: and start a blog
03:12 PM polprog: or even better make another video for my channel
03:14 PM remkooo1 is now known as remkooo
03:23 PM Emil: whatcha mean with doesn't have pin 1 marked
03:24 PM Emil: I have not made any reference like that
03:24 PM enh: I hate when my programs do not work
03:24 PM Emil: Doesn't everyone?
03:25 PM enh: Dunno.
03:25 PM enh: I need collaborators. Anybody cares?
03:26 PM enh: Nobody cares.
03:29 PM Emil: "I neew collaborators"
03:29 PM Emil: for what?
03:29 PM enh: https://hackaday.io/project/11724-yauvec-yet-another-unmanned-vehicle-controller
03:29 PM Emil: It's also probably not that nobody cares. It's more likely that people focus on their own things
03:30 PM polprog: i should wire a memtest for atmegas :D
03:30 PM polprog: write*
03:30 PM Emil: You mean write and dump?
03:30 PM polprog: yeah, what else can you test sram against
03:30 PM enh: I understand, Emil. I'm just complaining... Happens a lot.
03:31 PM Emil: polprog: you could test against every single possible value :D
03:31 PM Emil: polprog: 256 rounds
03:31 PM polprog: in dram it gets interesting, with all that patterns
03:31 PM Emil: Also test eeprom
03:31 PM polprog: row hammer bit flip sounds like a sick move
03:31 PM Emil: and registers
03:31 PM polprog: oh that too
03:31 PM Emil: and and
03:32 PM Emil: Progmem
03:32 PM bss36504: why would you need a memtest for an AVR?
03:32 PM bss36504: They get tested at the factory
03:32 PM Emil: bss36504: because lol awesome :D
03:32 PM Emil: bss36504: because it'd be nice to notice bitrot
03:32 PM bss36504: Sounds more like giant pain in the ass
03:32 PM enh: Did you guys know IPhone 6 and 6S came with a hardware bug that the manufacturer is pretending to ignore?
03:32 PM Emil: bss36504: shsshshshs
03:32 PM polprog: bitrot yeah
03:32 PM enh: People are making a lot of money fixing touch ICs.
03:32 PM polprog: gtg
03:32 PM Emil: polprog: nite
03:33 PM Emil: enh: what hardware bug?
03:33 PM bss36504: but the performance is guaranteed by accelerated life testing
03:33 PM bss36504: I don't understand
03:33 PM Emil: bss36504: for shit and giggles
03:34 PM enh: https://motherboard.vice.com/en_us/article/nz79qw/iphone-6-plus-touch-disease-touch-ic-engineering-flaw
03:35 PM Emil: Interesting
03:35 PM Emil: https://www.elfadistrelec.fi/fi/hakkuriverkkolaite-laehtoe-mean-well-irm-03/p/30051640?q=*&sort=Price:asc&filter_Buyable=1&filter_Category4=Koteloidut+l%C3%A4ht%C3%B6muuntimet+%28AC+%2F+DC%29&filter_Category3=AC+%2F+DC+-muuntimet&page=2&origPos=51&origPageSize=50&simi=97.5
03:36 PM enh: a BGA IC on a board that suffers flexing
03:36 PM Emil: Anyone know something like this but cheaper?
03:37 PM bss36504: I don't really understand what the sticky note is for. Also, the way they are holding that phone, with left thumb in middle while trying to swipe? makes no sense. My perfectly functioning iPhone 7 does exactly the same thing; nothing. Multitouch on the lockscreen is pointless/not a thing
03:38 PM bss36504: I'm not denying there is a defect, but that gif is dumb
03:38 PM enh: There is defect. I'm a victim
03:38 PM enh: Have you read the article?
03:39 PM bss36504: I read the article a while back.
03:39 PM bss36504: Again, not saying there isnt a defect.
03:39 PM enh: ok
03:39 PM bss36504: But the root cause analysis is sub par.
03:39 PM enh: Iphone 7 does not have it
03:40 PM bss36504: No I know, I'm just saying, the gesture they show in the gif doesnt "do anything" because it's not supposed to
03:40 PM bss36504: Which seems counterproductive to their cause
03:40 PM enh: I was wondering if I can offer my soldering services to fix those motherboards
03:41 PM enh: I agree with you. Did not understand the sticky note too
03:41 PM bss36504: I also find it hard to believe there there is such a common solder defect on only one BGA chip out of dozens scattered across the phone.
03:42 PM bss36504: Seems more likely that it is a silicon defect, not a solder. Until someone shows me a cross-sectioned solder ball under a microscope with clear separation, voiding, or other defects, I find that unlikely
03:42 PM bss36504: And that replacing the chip solves the problem, but everyone thinks it's a different root cause than it is.
03:42 PM enh: Your point is valid
03:42 PM bss36504: At any rate, they should address it.
03:43 PM enh: Maybe the chip is in a particularly bad area of the PCB
03:44 PM bss36504: 11% of all phones brought in for service =/= 11% of all iphones. My guess is they [apple] are just hoping that there aren't enough defects to constitute a class action suit, or they are weighing the cost of a recall against the cost of a settlement.
03:44 PM enh: I was wondering if I could just reflow the solder with flux and hot air
03:44 PM bss36504: They are apple after all
03:44 PM bss36504: enh: Maybe, BGA are touchy though
03:44 PM bss36504: I'd be interested to know if you could detach, clean, re-ball and re-solder the same chip, and have it fixed. That would certainly be more in favor of one cause or another.
03:45 PM enh: I do this with my sensors and they usually survive. liquid no clean flux and 300 deg C of hot air until the IC floats and settles again
03:45 PM bss36504: give it a go, worst case take it to someone who has new chips
03:46 PM enh: NExt time I get a blank screen I will probably try
03:46 PM enh: Now I canno carry the phon in my pocket any more
03:46 PM enh: ...
03:47 PM enh: Maybe my right index finger needs fixing too
03:48 PM rue_shop3: ok, well screw it, I wanted to use a t13 for this clock controller, but I"m gonna use a m8, cause they are _so_ cheap
03:48 PM rue_shop3: more so than the tiny13 I think
03:58 PM gregor2: guys.
03:58 PM gregor2: I have another problem.
03:58 PM rue_shop3: Tom_L, I'v still not worked out what to do with the t10 you sent me
03:59 PM rue_shop3: gregor2, I'm sorry, decapitation is the only solution
04:00 PM enh: Tell us about your other problem, gregor2
04:00 PM gregor2: https://pastebin.com/L4pBTTkY
04:01 PM gregor2: Why isnt that working?
04:01 PM enh: There must be something wrong
04:01 PM gregor2: I want a pin-change-interrupt.
04:02 PM enh: I want to live in Alaska
04:02 PM gregor2: Why that?
04:02 PM gregor2: Well
04:02 PM enh: Sorry, gregor2. I cannot understand assembler. I admire who can.
04:02 PM gregor2: Not as easy as a pin change interrupt for you i guess.
04:03 PM gregor2: oh no
04:03 PM gregor2: well
04:03 PM enh: This is for wise people. I'm dumb.
04:03 PM gregor2: Pin change interrupt!!!!
04:03 PM gregor2: Where are you!!
04:04 PM enh: Try the same in C
04:04 PM enh: And I may help
04:04 PM gregor2: i did it in c
04:04 PM gregor2: it already works
04:04 PM gregor2: So i dont need help there.
04:04 PM enh: so...
04:04 PM gregor2: I want asm!
04:04 PM enh: I want antigravity.
04:05 PM gregor2: Because i am a spoilt brat@!
04:05 PM enh: Mills say negative curvature electrons have negative gravitational mass. But I have not seen any reproduction of that experiment yet
04:06 PM gregor2: Wouldnt negative mass mean, that they travel faster than the speed of light?
04:06 PM enh: nope
04:06 PM gregor2: ok
04:06 PM gregor2: you won.
04:06 PM enh: negative *gravitational* mass
04:07 PM enh: not inertial
04:07 PM gregor2: Ah gravitational.
04:07 PM gregor2: No sorry
04:07 PM gregor2: I dont know what that is.
04:07 PM enh: anyway, can't you disassemble the hex file with the code written in C?
04:08 PM enh: *Gravitational* mass is that thing directly related to your weight here, over planet earth
04:08 PM gregor2: yes i can
04:08 PM gregor2: but i dont understand it
04:09 PM enh: That makes two of us
04:10 PM enh: I managed to completely stop the SPI communication service of my system. And I do not know why or how.
04:17 PM polprog: gregor2: http://www.avrfreaks.net/forum/tut-newbies-guide-avr-interrupts?page=all
04:18 PM polprog: gregor2: you havent changed the interrupt vector table
04:18 PM polprog: use .org 0xsomething
04:18 PM polprog: and put jmp PCINT0
04:18 PM polprog: see datasheet
04:18 PM polprog: for the vector location
04:19 PM polprog: oh wait
04:19 PM Jartza_ is now known as Jartza
04:20 PM gregor2: I did that.
04:20 PM gregor2: Diddnt i?
04:20 PM polprog: you did
04:20 PM polprog: in .org 0x0006
04:20 PM gregor2: yes.
04:20 PM gregor2: So why isnt it working?
04:20 PM polprog: what im looking for now is the explicit enable of PCINT0
04:20 PM polprog: you could use some comments in that
04:20 PM Jartza: evening
04:20 PM polprog: at least describe hardcoded registers
04:20 PM polprog: :P
04:21 PM polprog: i usually .equ 0x12 SOME_REG and then use it instead of the hardcoded value
04:21 PM polprog: what avr is that code for
04:22 PM gregor2: atmega328p
04:23 PM polprog: P or PB
04:23 PM enh: Lambda_Aurigae is still away?
04:23 PM polprog: ?
04:23 PM gregor2: :w
04:23 PM polprog: that's a big difference i already learned here :P
04:24 PM polprog: odd, atmega328P has PCINT0 vector at 0x003 not 0x006
04:25 PM polprog: that's first thing
04:25 PM gregor2: I configure the io byte d as output and pin 0 from byte b as input.
04:25 PM polprog: iirc it doesnt make any difference for pin change interrupt
04:25 PM gregor2: in the datasheet it says its 0x0006
04:25 PM polprog: it's also a way of software triggering it
04:26 PM polprog: https://puu.sh/xjtIp/8c2eb5f18a.png it's 0x003 in my datasheet
04:28 PM polprog: see page 74 for registers that control pcint
04:28 PM polprog: "If PCINT[7:0]
04:28 PM polprog: is set and the PCIE0 bit in PCICR is set, pin change in
04:28 PM polprog: terrupt is enabled on the corresponding I/O pin"
04:30 PM gregor2: oh sorry
04:30 PM gregor2: atmega328p
04:30 PM gregor2: it says atmega48a at yours.
04:31 PM polprog: you better know the differences because in ATmega328PB the PCINT0 vector is indeed at 0x0006
04:31 PM polprog: it says 48a becasue that datasheet describes the whole serie
04:31 PM polprog: the difference is mostly in flash size and ram
04:32 PM gregor2: ok
04:32 PM gregor2: than what is wrong with my thing
04:32 PM polprog: PCIE0 and PCICR
04:32 PM polprog: read the datasheet :P
04:34 PM gregor2: its 0x6b ans 0x68
04:34 PM gregor2: isnt it?
04:36 PM polprog: i dont know
04:36 PM polprog: there should be a register and bit table at the end
04:36 PM polprog: somewhere in the end
04:37 PM gregor2: yes i know that one
04:38 PM polprog: Emil: https://www.facebook.com/WindowsMemes69/photos/a.1712832609005272.1073741828.1710859879202545/1961285234160007/?type=3
04:56 PM enh: <enh|enh>=1
05:29 PM Lambda_Aurigae: enh, I'm always away.
05:29 PM Lambda_Aurigae: mostly working.
05:33 PM Tom_L: leave that for the next guy
05:45 PM enh: https://filebin.ca/3Y8q69rctfHk/IMG_3471.JPG
05:45 PM enh: sooo nice
05:45 PM enh: Master calling each slot on top, module slot being selected on bottom
05:46 PM enh: But no answer. Sh*t.
05:46 PM enh: Shit happens when we restructure all our code at the same time.
05:51 PM polprog: good luck
05:52 PM enh: thanks
05:53 PM enh: I'm surrounding the problem...
05:55 PM enh: Maybe sieging is a better word
06:00 PM Tom_L: it's just drawing you closer for the attack
07:13 PM NicoHood: does anyone here has some led strips handy? I am trying to compile fastled with a makefile. It builds fine, but I have no hardware to test. Would be nice if anyone is able to test my build. led type doesnt matter, I can compile for all.
07:58 PM enh: I do not. Sorry.
09:08 PM Sokomine_ is now known as Sokomine