#avr Logs

Dec 21 2017

#avr Calendar

06:06 AM MrFahrenheit: it's a digital scope with a crt screen
07:53 AM nux_ is now known as nuxil
08:13 AM gregor2: guys
08:14 AM gregor2: Help me please.
08:14 AM gregor2: sometimes i get "avrdude: Device signature = 0xffffff (probably .reduced_core_tiny) (retrying)".
08:15 AM gregor2: I am using an USBasp and an atmega328p.
08:16 AM gregor2: I also get "error: program enable: target doesn't answer. 1" all the time and i cant fix it. Thats happening from time to time and after a while its working again.
08:16 AM gregor2: Hopefully this time to.
08:17 AM gregor2: so annoying
08:18 AM gregor2: now its working again but i want to know how to avoid this.
08:22 AM nuxil: bad connections? chip is loose in its socket when you progamm it ?
08:23 AM nuxil: what speed ? try setting the speed lower
08:24 AM gregor2: already tried that
08:24 AM gregor2: i am using a breadboard
08:24 AM nuxil: aww.
08:25 AM gregor2: speed is .334
08:25 AM nuxil: .334 ?
08:25 AM gregor2: avrdude -p m328p -B .334 -c usbasp -U flash:w:control.hex:i
08:25 AM nuxil: thats none standar
08:25 AM gregor2: yes
08:25 AM nuxil: use: 110, 300, 600, 1200, 2400, 4800, 9600, 14400, 19200, 38400, 57600, 115200, 230400, 460800, 921600
08:25 AM gregor2: speed doesnt do annything
08:26 AM gregor2: tried 110
08:26 AM gregor2: doesnt do annything
08:26 AM nuxil: 110 is so slow you dont want to use it. do atleast 9600 :p
08:26 AM gregor2: its happening again
08:27 AM nuxil: i think its a connection issue if its on a breadboard.
08:27 AM gregor2: the -B option is period time on avrdude.
08:27 AM gregor2: the less the faster
08:27 AM nuxil: when i have my chip on the breadboard i need to press it down for it to connect. and put a bolt or something on it that has some weight
08:28 AM gregor2: i think you have a different breadboard than me/
08:28 AM nuxil: umm
08:28 AM nuxil: -B is not for speed
08:28 AM nuxil: -b is
08:29 AM gregor2: its very hard to push the chip in
08:29 AM gregor2: B is bitclock
08:29 AM gregor2: it says on the page
08:29 AM nuxil: and what does it say for -b ?
08:30 AM gregor2: baudrate
08:30 AM nuxil: see.
08:30 AM nuxil: baudrate is transfere speed
08:30 AM gregor2: i dont think that this is an issue
08:30 AM gregor2: because it works most of the time
08:30 AM nuxil: using big long wires ?
08:31 AM nuxil: *not big.. but long.. can cause unwanted signal to get picked up.. like your local radio station
08:32 AM gregor2: its a ribbon cable
08:32 AM gregor2: and that -b option
08:32 AM nuxil: gregor2, got a 2nd chip of same sort?
08:33 AM gregor2: seem to make a difference
08:33 AM gregor2: yes
08:33 AM gregor2: i have 3
08:33 AM nuxil: to test if its the chip or your setup
08:34 AM nuxil: if all 3 behaves the same. there is something wrong with your setup.
08:36 AM gregor2: but now
08:36 AM gregor2: it also works without the boudrate
08:36 AM gregor2: i dont know
08:36 AM gregor2: it works sometimes
08:36 AM gregor2: and sometimes not
08:36 AM gregor2: hard to test
08:36 AM nuxil: its when your fridge turnes on/off :p
08:39 AM nuxil: but idk. could be anything really, its a breadboard setup after all. your ribbon cable. some bad connection/gnd etc,
08:40 AM nuxil: btw. are you using windows or linux ?
08:40 AM gregor2: linux
08:40 AM gregor2: of course!!!!
08:41 AM gregor2: So that cant be the problem. xD
08:41 AM nuxil: :D
08:42 AM gregor2: By the way
08:42 AM gregor2: what happens if i connect the reset pin from an usbasp to ground?
08:43 AM gregor2: Is that a short circuit?
08:43 AM gregor2: Could be right?
08:43 AM gregor2: actually it should be on
08:44 AM gregor2: Because i think i did this a view times.
08:46 AM gregor2: Not a good idea?
08:46 AM gregor2: I guessed so
08:46 AM nuxil: no. dont connect reset to gnd. use a resistor
08:48 AM nuxil: do you have your reset pin floating atm ?
08:49 AM gregor2: no
08:49 AM nuxil: put example a 1k resistor on the reset pin from your programmer, then into the reset pin on the chip,
08:49 AM nuxil: https://cdn.instructables.com/FX1/LMLD/HQA04EOP/FX1LMLDHQA04EOP.MEDIUM.jpg
08:49 AM gregor2: but i think sometimes i did connect the reset pin directly to ground while the usbasp was still connected
08:50 AM nuxil: thats how i made my programmer.
08:50 AM nuxil: diode on pin 3 not needed tho.
08:50 AM gregor2: so the reset pin from the programmer was connected to ground
08:50 AM gregor2: diode?
08:50 AM nuxil: in that picure in that link
08:53 AM gregor2: Is it bad to connect the reset pin of the usbasp to ground?
08:53 AM gregor2: is that a shourt circuit?
08:53 AM nuxil: yes if it doesnt have any resistor on it.
08:53 AM gregor2: oh
08:53 AM gregor2: how did it even survive?
08:54 AM nuxil: when reset goes high you dead short it if it doesnt have a resistor.
08:55 AM gregor2: then it should be broken now shouldnt it?
08:55 AM gregor2: is it also so easy with an avrdragon?
08:55 AM nuxil: not necessary, iirc usb has some protection. . chips on your programmer might also have some internal thermal protection
08:56 AM gregor2: i guess it is not working a while after i did that
08:56 AM gregor2: and after some time it comes back.
08:56 AM gregor2: wat does that mean?
08:57 AM gregor2: what happened there?
08:57 AM nuxil: might be a termalprotection or current overload protection that kicked in, idk. im just guessing.
08:59 AM nuxil: anyway, peek at your programmer. see if the reset pin has a resistor on it or if it goes directly into the usbchip.
08:59 AM nuxil: if it dosent. meh. you dont need it anyway.. you can reset it manually. :p
08:59 AM nuxil: as long as miso,mosi and sck is workin you should be fine :p
09:01 AM gregor2: haha
09:01 AM gregor2: you are right
09:01 AM gregor2: actually
09:02 AM gregor2: yes the reset pin is connected directly to pin 16 of an Atmega8A
09:02 AM gregor2: i broke it!!!!!!
09:03 AM gregor2: no i diddnt
09:03 AM gregor2: it is still working
09:03 AM gregor2: but it is not short circuit protected they say
09:03 AM nuxil: thats why you put in resistors. so if you make a mistake. the current will be limited
09:04 AM gregor2: but then
09:04 AM gregor2: i have a voltage splitter
09:04 AM gregor2: Do you call it like that?
09:04 AM gregor2: Voltage splitter?
09:04 AM gregor2: i dont know
09:04 AM nuxil: hu ?
09:04 AM gregor2: I am from austria
09:04 AM nuxil: no. did you take a look at the link
09:05 AM gregor2: There we say Spannungsteiler. lol
09:05 AM nuxil: https://cdn.instructables.com/FX1/LMLD/HQA04EOP/FX1LMLDHQA04EOP.MEDIUM.jpg
09:05 AM rue_mohr: voltage divider
09:05 AM gregor2: I have a pullup on RESET
09:05 AM gregor2: yes
09:05 AM nuxil: ther is no voltage divider there
09:05 AM gregor2: a voltage divider i guess.
09:05 AM gregor2: if i have a pull up resistor there should be one
09:05 AM nuxil: if the isp has a resistor. it will be in series ,, but you dont take out the signal in between the two resistors
09:05 AM rue_mohr: dunno, whats up?
09:06 AM gregor2: ok
09:06 AM rue_mohr: programmers with resistors like that are usually trouble
09:06 AM gregor2: just
09:06 AM nuxil: rue_mohr, ? and how so ?
09:06 AM gregor2: dont connect the reset pin directly to ground if the usbasp is still connected
09:07 AM nuxil: rue_mohr, they are just limiting the current. why would they cause any problem unless you put like 100K there.
09:08 AM nuxil: and old school programmers like stk200 etc do it this way :p
09:08 AM gregor2: I guesss because of the same reason i said
09:08 AM gregor2: the voltage drop on the internal resistor
09:09 AM gregor2: But if you dont put a resistor there they should not cause any problems.
09:09 AM gregor2: I dont know
09:10 AM gregor2: A different wuestion
09:10 AM gregor2: sometimes i connect the usbasp accidentally to the microcontroller without it being connected to voltage
09:10 AM gregor2: what happens there
09:10 AM gregor2: and
09:11 AM gregor2: what happens by connecting the usbasp to the circuit while being connected to voltage but the usbasp not being connected to a usb port?
09:15 AM nuxil: questions:. why are you not using the 5v from the programmer? not it not have a 5v output?
09:15 AM nuxil: *does
09:16 AM rue_mohr: nuxil, its experience, programmers with series reistors like that are trouble
09:16 AM gregor2: Thats even more dangerous
09:16 AM rue_mohr: he stk200 parallel port ones only worked if they were buffered
09:17 AM gregor2: Its not short circuit protected
09:17 AM nuxil: rue_mohr, i dont have problems programming my atiny85 or atmega324 with it.
09:17 AM rue_mohr: ok
09:17 AM gregor2: if i do a short there.
09:17 AM gregor2: The programmer is dead
09:17 AM gregor2: Besides from thet
09:17 AM gregor2: I want
09:17 AM gregor2: that my robot
09:17 AM rue_mohr: dont be surprised if it suddenly wont reprogram a chip
09:17 AM gregor2: can drive withoute the notebook
09:20 AM nuxil: dont mess with external powersuppluy when you got what you need. you have 5v on the usb. put in a diode there and drop the voltage to 4.3ish. you will still be able to programm the chip with that voltage. my 1st programmer i made did 3.3V only just fine.
09:21 AM nuxil: i mentioned the diode since you are paranoid about shorts :p
09:21 AM gregor2: i dont have a diode
09:21 AM gregor2: :(
09:21 AM nuxil: o.O
09:21 AM gregor2: what?
09:21 AM gregor2: not even a diode?
09:21 AM gregor2: I habve leds.
09:22 AM gregor2: But are going to burn if i use them that way i guess.
09:22 AM nuxil: everyone has a diode. check old poweraddapters etc
09:22 AM gregor2: I see
09:22 AM nuxil: that is no longer in use
09:22 AM gregor2: i could just solder one out of something
09:22 AM nuxil: but you dont need it :p
09:23 AM gregor2: My mother throws away old stuff
09:23 AM nuxil: its gold worth if your into electonics. lots of parts to salvage
09:23 AM gregor2: She dont understands that.
09:24 AM gregor2: She thinks thats garbage and throws it away
09:24 AM nuxil: so do some dumpster diving when she does that :p
09:24 AM gregor2: I had a pcb with lots of relays, resistors, diods leds
09:25 AM gregor2: and so on
09:25 AM gregor2: dumpster diving?
09:25 AM gregor2: Whats dumpster diving?
09:25 AM nuxil: http://i.dailymail.co.uk/i/pix/2013/12/22/article-2527860-1A3FE69400000578-642_634x416.jpg
09:26 AM nuxil: but for electonics :p
09:26 AM gregor2: That picture. xD
09:27 AM nuxil: this is more like dumpster diving tho
09:27 AM nuxil: https://www.mysecuritysign.com/blog/wp-content/uploads/2017/06/shutterstock_403414-short-1.jpg
09:27 AM nuxil: :)
09:28 AM gregor2: omg
09:28 AM nuxil: https://www.youtube.com/watch?v=EXg5MdYMbHs
09:29 AM gregor2: no more~!
09:29 AM gregor2: I have to calculate my thingl
09:29 AM nuxil: eevblog :D
09:29 AM gregor2: Am i deviding by to by rightshifting?
09:29 AM gregor2: Am i deviding by two by rightshifting?
09:29 AM nuxil: yes
09:30 AM gregor2: So thats how you devide with an atmega
09:30 AM nuxil: if you rightshit 1
09:30 AM nuxil: you divide by 2
09:30 AM nuxil: rightshift 2 and you divide by 4.
09:30 AM nuxil: so on
09:31 AM gregor2: i see
09:31 AM gregor2: so
09:31 AM gregor2: if i want to control the motors
09:31 AM gregor2: without them swinging
09:31 AM gregor2: They swing because if i control them to fast
09:31 AM nuxil: i know 0 about motors.
09:31 AM gregor2: you know
09:31 AM gregor2: doesnt matter
09:31 AM gregor2: me neither
09:31 AM gregor2: I can messure the speed of the motors
09:32 AM gregor2: and i want to hold the speed.
09:32 AM nuxil: you want to pwm ?
09:32 AM gregor2: So i am increasing the voltage
09:32 AM gregor2: Kind of
09:32 AM gregor2: a 2ms pulse means full speed ahead
09:32 AM gregor2: 1.5ms means stand
09:32 AM gregor2: and 1ms means full speed reverse.
09:33 AM gregor2: thats how the motor controller takes signals
09:33 AM gregor2: i guess it is making voltages from them.
09:33 AM gregor2: I am using the Timer/Counter1 for that
09:33 AM gregor2: I am just increasing OCR1A and OCR1B if it is turning to slow.
09:34 AM gregor2: Works just nice
09:34 AM gregor2: But if i am increasing it to slow it is regulating very slow
09:34 AM nuxil: 2ms is about 500hz
09:34 AM gregor2: If i increase it to fast it will swing
09:34 AM gregor2: you know
09:35 AM gregor2: The motor is to slow and it increases but it takes a while for the motor to respond
09:35 AM gregor2: and thats why it regulates up and down all the time.
09:35 AM gregor2: It just needs to be 2ms on
09:35 AM gregor2: how long it is of doesnt matter.
09:36 AM gregor2: It works just fine
09:36 AM gregor2: but i want to regulate the speed fast and dont want it to swing at the same time
09:36 AM gregor2: now i am trying to regulate fast if it is is way off the right speed.
09:37 AM gregor2: And if it has nearly the right speed
09:37 AM gregor2: it should regulate the voltage slowly.
09:37 AM nuxil: so.
09:37 AM gregor2: You know what i mean right
09:38 AM nuxil: https://gyazo.com/2cd615ef46d51f18a51a66591c096e84
09:38 AM gregor2: thats funnny
09:38 AM nuxil: then set OCR0B to 255 to get 100% duty "2ms" on time
09:38 AM gregor2: That i see your desktop now
09:38 AM Neomex is now known as vdsa__
09:39 AM gregor2: You mean just set it emediatly
09:39 AM gregor2: with a formula?
09:39 AM gregor2: Emediatly to the right number?
09:39 AM gregor2: Yes
09:39 AM gregor2: that would be the ideal thing
09:39 AM gregor2: but
09:39 AM vdsa__ is now known as Neomex
09:39 AM Neomex is now known as vdsa__
09:40 AM vdsa__ is now known as Neomex
09:40 AM gregor2: The more load i put on the motors, the longer the pulse has to be.
09:40 AM gregor2: accept
09:40 AM gregor2: that would be awsome
09:40 AM nuxil: by adjusting OCR0B you an adjust the "puls on time"
09:40 AM nuxil: setting it to 0 means no signal out.
09:41 AM gregor2: I dont need any prescale
09:41 AM gregor2: I am using the 16 bit timer
09:41 AM gregor2: that is just right with 16Mhz or 12Mhz crystal i am using right now
09:42 AM gregor2: because the longest pulse is 2ms and it will have to count to 24000.
09:42 AM gregor2: 65536 is the maximum
09:42 AM gregor2: Just right.
09:42 AM gregor2: I already gut that one working
09:42 AM gregor2: I have motor encoders.
09:42 AM gregor2: They are counting up while the Motor is rotating.
09:43 AM gregor2: I want the pulsewidth to be modulated so i have an exact speed
09:43 AM gregor2: The problem is
09:43 AM gregor2: if i increase or decrease the OCR1A to fast
09:43 AM gregor2: The motor is not responding until it is way to late
09:43 AM nuxil: you cant pwm with 16 bit, it will give you to low freq. 16/2^16 = 244hz.. 2ms is 500,
09:44 AM gregor2: That doesnt matter
09:44 AM gregor2: Frequency is not a big deal.
09:44 AM gregor2: Because this Motorcontroller holds the speed until the next command
09:44 AM gregor2: If i just give him a 2ms pulse just once
09:45 AM gregor2: it will hold the speed until i give it a new pulse.
09:45 AM gregor2: it is the sabertooth2x12rc
09:45 AM gregor2: motorcontroller
09:45 AM gregor2: it is doing the rest
09:45 AM nuxil: yes it does.if you want pwm, your 16bit pwm will be at 244hz. so. at 100% duty it will be 0.4ms. and you need a 2ms pule.
09:45 AM gregor2: no
09:46 AM gregor2: Just the voltage has to be on for 2ms
09:46 AM gregor2: how long it is off, that doesnt matter.
09:46 AM gregor2: the cycle will be around 4ms as far as i remember.
09:47 AM gregor2: 2^16/12MHz;
09:47 AM gregor2: so 5.5 ms.
09:47 AM gregor2: around that
09:47 AM gregor2: thats just perfect
09:47 AM nuxil: the other way
09:47 AM nuxil: 12/2^16
09:48 AM gregor2: it has a 3ms-4ms time to wait for the next pulse
09:48 AM gregor2: is it really like that?
09:48 AM gregor2: I wanted to calculate the time
09:48 AM gregor2: Pulse time .
09:48 AM gregor2: Or time until the timer overflows.
09:49 AM gregor2: No it has to be that way
09:49 AM gregor2: 5.5 ms
09:49 AM gregor2: thats the time it takes the timer to oferflow
09:50 AM gregor2: thats perfect because it has to be a little more than 2ms
09:50 AM gregor2: the longest pulse
09:50 AM gregor2: 2ms is just the on time of the pin
09:50 AM gregor2: Its all just about the time the pin is high.
09:50 AM gregor2: The time it is low doesnt matter at all.
09:51 AM gregor2: The motorcontroller just meassurest the on time and gives voltage to the motors according to that.
09:51 AM gregor2: It already works
09:51 AM gregor2: i have tested it
09:51 AM gregor2: what i want to do now is the microcontroller to regulate the speed
09:52 AM gregor2: I also thought about callibrating
09:52 AM gregor2: but i have motor encoders.
09:52 AM gregor2: They are messuring the speed and the microcontroller can vary the pulsewith according to the speed.
09:53 AM gregor2: I want to hold one speed
09:53 AM gregor2: Doesnt matter how much the motor is loaded.
09:53 AM gregor2: And the perfect thing would be that the mcu shuts down the motor if the load is to high.
09:53 AM gregor2: because its bad for the motor.
09:54 AM gregor2: What i do is listening to the speed and increasing or decreasing OCR1A;
09:54 AM gregor2: If i do that to fast, it will swing
09:55 AM gregor2: so the motor gets faster and slower all the time.
09:55 AM gregor2: but i dont want to do it to slow.
09:55 AM gregor2: but now i hae to go
10:16 AM gregor2: so
10:16 AM gregor2: and?
10:17 AM gregor2: what do you think?
10:30 AM kl0wn: what
10:55 AM polprog: dafuq
10:56 AM polprog: shame i logged on late :P
10:56 AM polprog: had a lot of work today
11:30 AM gregor2: j
11:30 AM gregor2: What do you think is the best programmer?
11:30 AM gregor2: from your opinion?
11:32 AM nuxil: a official one
11:33 AM polprog: anything really
11:33 AM polprog: anything that is reliable
11:34 AM polprog: i use a dragon just because it's the only working USB one i have. if i had a parport in my PC, i'd use the cable i have made two years ago
11:50 AM nohit_: atmel-ice is good but expensive as hell
11:51 AM nohit_: you can use it for avr, avr32 and arm
11:56 AM Emil: polprog:
11:56 AM Emil: polprog
11:56 AM Emil: polprog wanna hear a sikrit?
11:56 AM Emil: polprog it's like
11:56 AM Emil: super grwat
11:57 AM Emil: like cheap as fuck but super usable
11:57 AM Emil: it's called usbasp and I cant believe you have not ordered five oe built a couple already :D
11:58 AM Emil: also hmm
11:58 AM Emil: are there any m32u4 based avr programmers
11:58 AM Emil: I should design one
11:59 AM antto: make sure it has PDI
12:00 PM antto: and that it works with avrdude 6.x
12:02 PM antto: polprog this is mine: https://i.imgur.com/EMZzUdq.jpg
12:02 PM antto: i even have a LED showing whether the reset pin is up or down
12:03 PM APic: It is not as pernicious as it looks.
12:03 PM APic: 😉
12:05 PM antto: it looks nasty.. but it works for atmegas fine.. thanks to avrdude
12:21 PM polprog: nohit_: didnt know that you can use ice for all 3 types. that's awesome
12:22 PM polprog: Emil: im happy with what i have ;_
12:22 PM polprog: ;)
12:22 PM polprog: damn kbd
12:26 PM polprog: antto: crimped this a while ago https://puu.sh/xG5cr/98fe7a007e.jpg
12:26 PM polprog: let me find my parport cable
12:29 PM polprog: this https://puu.sh/yLdUy/4b6c972bed.jpg i can t even remember which wire is which here
12:30 PM polprog: also, no linux server is complete without cat: https://puu.sh/yE0y2/5f8f5e317e.jpg
12:34 PM antto: yup.. https://i.imgur.com/XD47DfM.jpg
12:35 PM polprog: do i see winamp and windows xp there
12:35 PM polprog: ?
12:35 PM antto: yez, yez
12:35 PM polprog: my man
12:35 PM polprog: ;)
12:36 PM antto: the winamp skin is one i made myself in mspaint, in 2003 x_x
12:36 PM kl0wn: it really whips the llamas ass
12:36 PM antto: huehuehue
12:36 PM polprog: haha
12:36 PM polprog: that photo is very nice
12:39 PM antto: i got tons.. https://i.imgur.com/ShYC6A2.jpg
12:39 PM polprog: i love cats
12:39 PM polprog: this one's beautiful
12:40 PM polprog: got tons as well
12:40 PM polprog: https://puu.sh/x7nsT/1d20e9c4ab.jpg and https://puu.sh/ya0yO/95853cd2fe.jpg
12:42 PM Emil: What
12:42 PM Emil: We posting cat photos now?:D
12:42 PM antto: no, we're innocent! https://i.imgur.com/T6Wqg1Q.jpg
12:43 PM antto: something on-topic (but the atmega is not visible) https://i.imgur.com/pFXZM5U.jpg
12:44 PM polprog: 2 SBCs: https://puu.sh/yxl5F/28ac7273e2.jpg
12:44 PM polprog: no cats there
12:45 PM Emil: I also color code most with: vcc red, gnd black, clock white, master/host/controller gold/yellow/orange, slave/device green/more pesant color (like orange if there's also yellow), blue/gray for cs/reset/auxillary orwhatever
12:45 PM antto: drum machine https://i.imgur.com/uuF4osS.jpg
12:46 PM polprog: wow nice. what model is that? or custom built?
12:46 PM Emil: antto: that drum machine cpb
12:46 PM Emil: is
12:46 PM Emil: not
12:46 PM antto: (cat hair visible)
12:46 PM Emil: designed for manufacturability
12:46 PM Emil: >all th
12:46 PM Emil: >so much waster space
12:46 PM Emil: wasted*
12:46 PM Emil: >overhang wires
12:46 PM polprog: that's cosit's for artists
12:46 PM polprog: SMD looks less artsy
12:46 PM Emil: BUT
12:46 PM antto: polprog e-licktronic Yocto (tr-808 clone)
12:46 PM Emil: >Blac pcbs:D
12:47 PM Emil: polprog: wtf
12:47 PM polprog: if they could they would make it poin tot point
12:47 PM Emil: polprog: smds are artsy as fuck
12:47 PM polprog: Emil: for some reason ive seen many analogue stuff being done in tht
12:47 PM polprog: no bloody idea why
12:47 PM Emil: They are clean and smooth and and
12:47 PM Emil: th is just a fucking mess
12:47 PM polprog: antto: mmm tr808
12:47 PM Emil: polprog: old designs that's why
12:47 PM antto: Emil the actual front panel requires a certain size in order not to stuff all the pots/switches/things together
12:48 PM Emil: Also they claim "hifi"
12:48 PM * polprog is listening to his rave-house part of the music playlist
12:48 PM Emil: but it's bullshit as always
12:48 PM polprog: Emil: directional cables, tube amps, high end audio is a realm of people with poor tech knowledge and loads of money
12:49 PM antto: Emil this is a DIY kit, so tht is more noob friendly
12:49 PM antto: also, easier to debug IMO
12:50 PM polprog: make a tube amp (mandatory clean plexiglass chassis so you can see the tubes - and leds under the tubes so they look more cool) that connects to an ipod and you're done
12:50 PM polprog: not less than 1000$ bucks a piece
12:50 PM polprog: total mfg cost maximum 100$
12:52 PM polprog: antto: does it generate all drum samples in analog? i thought they are digitally sampled. just noticed the subdivisions on the PCB
12:52 PM antto: this is fully analog(ue)
12:52 PM antto: like the original
12:52 PM antto: the digital stuff is just a sequencer that controlls (triggers) the drums
12:53 PM polprog: nice nice
12:53 PM polprog: i like music
12:53 PM polprog: i used to play the piano. recently i played a bit
12:54 PM antto: i can't really play properly.. but that doesn't stop me from making electronic noises that faintly resemble music
12:54 PM polprog: haha
12:54 PM polprog: i have a real roland sh-101
12:54 PM polprog: synth
12:55 PM polprog: it's monophonic though.
12:55 PM antto: i know.. i'm not too impressed by it
12:55 PM antto: i'm all 303 ;P~
12:55 PM polprog: mayb one day i would make a polyphonic clone in digital. but that wouldn't be the thing
12:55 PM antto: that already exists
12:56 PM polprog: tb303. i only played it via an LMMS plugin on my midi keyboard
12:56 PM polprog: i liked it though
12:56 PM antto: ehm, but in software, not digital-hardware
12:56 PM antto: uh, the one in LMMS is probably not a good example of the real thing ;P~
12:56 PM polprog: you know any cool tracks which use 303 and 808?
12:56 PM polprog: yeah they even say it's not a good clone
12:56 PM polprog: ;(
12:57 PM antto: hmz..
12:57 PM antto: do mine classify as good ;P~
12:58 PM polprog: sure, ill happily give them a try ;)
12:59 PM antto: https://soundcloud.com/antto/antto-sr-8050_blah
01:00 PM polprog: nice
01:02 PM avrdude_: Hi.. does it sound sane that avr-gcc produces output in which a non-main function is placed at address 0?
01:02 PM polprog: yeah
01:02 PM antto: i don't think main is on 0
01:02 PM polprog: at adress 0 there is a jump behind the interrupt vector table
01:03 PM polprog: main starts after stack initialization after ISR vect table
01:03 PM antto: there's stuff that has to be prepared (variable initializations and what not) before main can begin
01:04 PM polprog: antto: i like this very much https://soundcloud.com/antto/antto-void
01:05 PM antto: both of these are actually "fake" .. fully digital.. the 808 is samples, 303 is software (but more decent than the one in LMMS)
01:06 PM polprog: avrdude_: take a look at this: https://puu.sh/xTehX/a5e28b34d7.png
01:07 PM avrdude_: okay.. What I mean is that when I look at it with avr-objdump, I get "00000000 <main2>" and "000000024 <main>". And the non-main function is what executes when I run it
01:07 PM polprog: that's interesting, can you paste is somewhere?
01:08 PM polprog: also, old server: https://puu.sh/yd8YM/1ad1cfb344.png
01:08 PM avrdude_: Sure thing..
01:08 PM polprog: it now sits unplugged under the workshop desk, it was a good machine
01:11 PM avrdude_: https://pastebin.com/v2UV4Z6Y
01:12 PM polprog: wtf
01:12 PM polprog: where's the interrupt table
01:12 PM polprog: how do you compile it?
01:12 PM polprog: and what's the source code, if i may ask
01:13 PM avrdude_: How should I know where it is? :) I'll paste the Makefile & source too
01:15 PM avrdude_: https://pastebin.com/Jtu90xdS
01:17 PM avrdude_: https://pastebin.com/LJepLdAX <-- makefile
01:17 PM avrdude_: I thought there was something wrong with the objcopy first, but it's the elf that looks weird to begin with
01:18 PM polprog: can you try to compile it manually with avr-gcc file.cpp
01:18 PM polprog: and objdump a.out
01:18 PM avrdude_: sure
01:19 PM avrdude_: avr-gcc -Os -DF_CPU=16000000UL -mmcu=atmega328p -c -o main.o main.c
01:20 PM avrdude_: avr-gcc -o main.elf main.o
01:20 PM avrdude_: avr-objdump -S main.elf
01:20 PM avrdude_: yields the same output.. 0000000 <main2> & 00000024<main>
01:22 PM polprog: wait
01:22 PM polprog: wait
01:22 PM polprog: wait
01:22 PM gregor2_ is now known as gregor1
01:22 PM polprog: you are compiling against arduino bootloader, not bare metal avr
01:22 PM gregor1 is now known as gregor2
01:22 PM polprog: it's ok, lol
01:22 PM polprog: that explains where the isr table went
01:22 PM polprog: :D
01:24 PM avrdude_: well yes I am, but it has nothing to do with it? :/ I merely compiled it with avr-gcc ?
01:24 PM avrdude_: I haven't touched avrdude before I can see that something is not right
01:26 PM avrdude_: At first I thought that the arduino-bootloader has something funny in it that picks a non-main function to run in a loop (or whatever the arduino "environment" does). But now I found out that the binary looks weird from the start
01:27 PM avrdude_: I looked at the bootloader too, and it jumps to "start_app" which is located at address 0.
01:28 PM polprog: ok, this is odd.
01:28 PM avrdude_: and avr-gcc outputs exactly what I presented to you
01:28 PM polprog: i tried first c file ive got, compiled it against mega8, it outputs a full binary
01:29 PM polprog: compiled it your way and it outputs that oddity
01:29 PM avrdude_: @polprog: Yes, I was going to do a very simple thing last night, my little test worked fine, and when I created more than one function.. everything got messed up. I couldn't believe this
01:29 PM avrdude_: What is your way?
01:29 PM polprog: can you try compiling directly? like avr-gcc -mmcu=atmega328p -o main main.cpp
01:30 PM polprog: (funny enouhg i compile to object files in my C++ project for PC and it links properly)
01:30 PM polprog: add -DF_CPU=... and the rest of the options aside from -c
01:32 PM avrdude_: and suddenly things seem to look a lot better, good man!
01:33 PM polprog: no need to overcomplicate
01:33 PM polprog: ;)
01:33 PM avrdude_: well, better as in, the file looks better. But not sure the bootloader will like it. :)
01:36 PM avrdude_: yes, so the file has a sweet, sweet <_init>, that, like a ninja, jumps over <main2> and executes from address 0x80, which is <main>. Clearly, this is no good for the bootloader, though :)
01:37 PM polprog: why?
01:38 PM avrdude_: because the (arduino) bootloader seems to jump to 0x00, which is _ctors_end ?
01:38 PM polprog: yes, and that's the start of your program
01:39 PM polprog: no idea why the name is ctors_end
01:40 PM avrdude_: d'oh.. it jumps to <init>... sorry
01:48 PM avrdude_: I don't get why the makefile adds that '-c' there, though
01:48 PM avrdude_: not 'why', but 'how'
02:27 PM polprog: write your own make file.
02:35 PM nohit_: antto what do you think about tb-3 ?
02:58 PM antto: nohit_ it's sad that it's so close but no cigar
03:34 PM nohit_: i like it
03:34 PM nohit_: we play da funk live with my friend
03:35 PM nohit_: but then again i dont have the original so i dont know
03:35 PM nohit_: i do have xoxbox pcb(s)
03:38 PM nohit_: and the rare parts
04:18 PM day__ is now known as day
04:24 PM nuxil: i fixed up my pwm calulator :p
04:25 PM nuxil: https://gyazo.com/8e68cff3beecbf11b7947ad74c87f07a :) handy if need to calulate a ctc pwm freq
04:27 PM cehteh: how about using a pastebin instead pics :D
04:27 PM cehteh: and why dont you just make macros/functions for that?
04:27 PM nuxil: sure i pase my shitty code :p
04:27 PM nuxil: *paste.
04:27 PM nuxil: its python
04:28 PM cehteh: i'd just include that in the AVR/C code
04:28 PM cehteh: if i need that
04:29 PM nuxil: https://pastebin.com/1e8sFRvZ
04:30 PM nuxil: this is just if you need to quicly know what prescale and value for the OCRnx to use.
04:30 PM nuxil: no need to compile stuff :p
04:32 PM nuxil: besides. it will show you several matches at some freq.. like the picture.
04:45 PM polprog: https://youtu.be/pB7AUdxuMlI messing around in c++
04:45 PM polprog: night
04:46 PM nuxil: :)
04:46 PM nuxil: gn
06:07 PM [1]MrMobius is now known as MrMobius
10:33 PM rue_mohr: https://www.youtube.com/watch?v=COD23cVWcIo
11:19 PM jerkey: help how do i copy a special pointer register in asm on an atmega328p?