#avr | Logs for 2013-04-02

Back
[01:15:29] <rue_house> sorry, I'm into too many things at once
[01:31:52] <inflex> Damned S.King nick names in here now I see
[02:04:01] <manoj_> i am powering my atmega16a using external supply of 5v on pin 10 and 11 and have connected MISO, MOSI, SCK, RESET to avrasp but not able to query chip signature
[02:04:14] <manoj_> target not responding
[02:04:14] <manoj_> can you help me on this.
[02:10:01] <langoliers> rue_house<< yeah mee too :) but i try to reduce the parallel things' number
[02:10:26] <langoliers> manoj_<- try a chip erase maybe
[02:10:58] <langoliers> i don't know now if the device returns signature if it is locked
[02:12:36] <manoj_> i have a brand new chip
[02:13:39] <langoliers> hm, then your wiring may be wrong
[02:14:02] <langoliers> i have a dapa cable btw
[02:14:25] <langoliers> what type you have?
[02:14:55] <manoj_> i am doing this on breadborad
[02:15:02] <langoliers> oh
[02:15:06] <langoliers> that can be a problem too
[02:16:41] <manoj_> means
[02:17:06] <manoj_> can you help me to figure out
[02:17:19] <manoj_> what could be the possible cause apart from wiring
[02:17:32] <manoj_> because i think i have double checked it
[02:17:44] <langoliers> sure
[02:20:12] <langoliers> manoj_<< so, you use parallel port ?
[02:22:08] <langoliers> http://files.myopera.com/CrazyTerabyte/atmega8/AVR-dapa-hi.png
[02:22:13] <langoliers> just wire it up like this
[02:22:41] <manoj_> no
[02:22:48] <manoj_> i am using usb
[02:22:49] <langoliers> reset will be good wit 47 ohm resistor(, or 0), others like 100 ohm, none are really required, but good to be there
[02:22:53] <manoj_> programmer
[02:23:07] <langoliers> ok, avrdude?
[02:23:19] <manoj_> yes
[02:23:20] <langoliers> you need to specify your programmer type to avrdude then.
[02:23:29] <manoj_> i have specified
[02:23:36] <langoliers> it will of course not find your device on parallel port
[02:23:39] <manoj_> that is been detected
[02:23:54] <manoj_> but target is not responding
[02:24:33] <langoliers> wiring error then.
[02:25:00] <manoj_> i was earlier giving 9v supply to chip
[02:25:08] <langoliers> hahaha ok
[02:25:11] <langoliers> then chip is dead
[02:25:12] <manoj_> can that make chip to burn out
[02:25:45] <langoliers> how you like your chips? i like mine well fried
[02:26:38] <manoj_> that means its certainly got burnt out
[02:26:55] <manoj_> isnt there any way to check this
[02:26:59] <langoliers> it does not have much chance
[02:27:25] <langoliers> the 9V battery will avalanche the chip with too much current, i'm not sure what can it take
[02:28:08] <manoj_> ok i will try it with new chip
[02:28:27] <langoliers> if you read the chip docs they say 5.5V or 7V max voltage
[02:28:45] <manoj_> i saw that later
[02:28:59] <manoj_> till that moment it was already done
[02:30:48] <manoj_> langoliers: thanks
[02:31:02] <manoj_> for helping me on this
[02:31:18] <manoj_> i am doing this for first time
[02:31:40] <manoj_> i will takecare of the voltage next time
[02:38:58] <langoliers> use a 78L05 or 7805
[02:39:11] <langoliers> that will enable you to use the 9v batt
[02:39:44] <langoliers> i had my first running lights with that
[02:40:38] <manoj_> great
[02:40:46] <manoj_> i will try that on new chip
[02:41:00] <langoliers> cool
[02:41:26] <langoliers> oh and add 100nf at least from gnd to vcc and the 9V input to gnd
[02:41:40] <langoliers> that will make it stable
[02:42:10] <manoj_> these chips are for voltage regulation
[02:42:25] <langoliers> yes
[02:42:43] <langoliers> it will make 5V
[02:43:02] <manoj_> these work specifically for 5v
[02:43:19] <langoliers> sure, 3 terminals only
[02:43:25] <langoliers> in, gnd, out5V
[02:43:31] <langoliers> simple ?
[02:44:11] <manoj_> hmm
[02:44:16] <manoj_> sounds great
[02:44:21] <manoj_> i will use this
[02:45:00] <langoliers> though 78L05 has its pinout reversed relative to 7805, so you can kill your microcontroller if you don't install it properly
[02:46:23] <manoj_> hmm
[02:46:33] <manoj_> i have noted it down
[02:47:26] <langoliers> did you know you can kill the microcontroller by reversing + and - ? this is why they add a diode like 1N4148, or 1N4007 in series with input
[02:49:20] <manoj_> hmm
[02:49:25] <manoj_> great
[02:49:59] <langoliers> cheap bike flashers, and lamps and things used to die when you put batteries in them reversed :)
[02:51:03] <Richard_Cavell> langoliers: But if you add a diode you lose 0.7 volts
[02:51:28] <langoliers> Richard_Cavell<< i add a synchronous rectifier then
[02:52:43] <langoliers> sure this really matters at 2x AA 1.5V batts, or a single lithium ;)
[02:53:28] <langoliers> but for 9V->5V is really does not matter
[02:54:27] <Richard_Cavell> No
[02:54:31] <langoliers> Richard_Cavell<< btw there are also schottky barrier diodes with lower forward voltage drop like 1N5819
[02:54:34] <Richard_Cavell> For 9v->5v you have plenty of room
[03:41:47] <langoliers> i have a dead aluminium cased large car audio amplifier, what should i make from it? power converter for wind turbine?
[03:42:19] <langoliers> or an UPS?
[03:43:18] <Valen> make a mini barge, paint it up and sail it on the river
[05:21:45] <OndraSter> langoliers, fix it :)
[05:24:08] <OndraSter> I like fixing stuff
[05:24:17] <OndraSter> challenge
[06:04:38] <xoom> hi
[06:05:18] <xoom> is there any other way to interrupt atmega8 externali without using int0,int1 or uart
[06:05:19] <xoom> ?
[06:05:50] <xoom> becouse all pins of PORTD is in use
[06:06:04] <RikusW> mega88 got pin change interrupts
[06:06:35] <xoom> but im using mega8 :/
[06:07:32] <RikusW> spi ?
[06:07:44] <RikusW> comparator
[06:07:50] <RikusW> twi
[06:08:07] <xoom> comparator can interrupt?
[06:08:11] <RikusW> yes
[06:08:30] <RikusW> also on PD...
[06:09:06] <RikusW> guess you'll have to move stuff to other pins...
[06:10:04] <xoom> but there is no other full port
[06:10:10] <xoom> like PB
[06:10:17] <xoom> have to use xtal
[06:11:35] <RikusW> sounds like you need more pins...
[06:11:40] <RikusW> like m324
[06:12:16] <RikusW> that got 4 full ports
[06:12:32] <xoom> looking now at TWI interrupts
[06:13:45] <xoom> This bit is set by hardware when the TWI has finished its current job and expects appli-
[06:13:46] <xoom> cation software response.
[06:14:13] <xoom> can it be called externaly?
[06:14:20] <RikusW> using I2C
[06:14:24] <RikusW> aka TWI
[06:14:40] <xoom> but need to send actual data?
[06:14:50] <xoom> or i can just trick it
[06:14:51] <xoom> :)
[06:14:56] <RikusW> probably
[06:16:55] <xoom> When a bus error has occurred due to an illegal START or STOP condition
[06:17:11] <xoom> maybe that
[06:38:12] <xoom> grr cant interrupt
[06:38:35] <Horologium_> then maybe use the correct chip for the job?
[06:38:42] <xoom> TWCR |= (1<<TWIE)|(1<<TWEN);
[06:39:01] <xoom> Horologium_ for now just prototyping
[06:39:19] <xoom> later will choose proper avr
[06:39:51] <xoom> but now need somehow to jump out of loop
[06:40:30] <xoom> that loop check one bit in one register
[06:40:43] <xoom> but i cant change it until im interrupt
[06:41:22] <xoom> but how to imitate twi interrupt
[07:05:25] <xoom> no more suggestions? :)
[07:09:00] <R0b0t1> xoom: What's the problem?
[07:09:15] <R0b0t1> Does your chip have I2C hardware?
[07:09:37] <R0b0t1> If not I would caution you it is much easier to bit-bang an I2C master than it is a slave.
[07:09:53] <R0b0t1> Would probably need to dedicate a timer and some serious processor time to it.
[07:09:58] <Horologium_> R0b0t1, no, he needs an external interrupt.
[07:10:06] <Horologium_> and he is using his interrupt pins for something else.
[07:10:28] <R0b0t1> Pin-change interrupts?
[07:10:31] <R0b0t1> Got one for every port
[07:10:59] <xoom> atmega8 not have
[07:11:48] <R0b0t1> You would appear to be fucked
[07:11:55] <R0b0t1> get a better chip now as opposed to later
[07:12:09] <xoom> to be more clear im trying that DDS algo
[07:12:17] <xoom> with inline asm
[07:12:17] <R0b0t1> (it is understandable if you do not like this answer)
[07:12:30] <R0b0t1> Perhaps you could try a different implementation
[07:12:43] <R0b0t1> but I'm afraid you'll be more acquainted with what needs to happen than I am
[07:13:04] <xoom> but that algo works great
[07:13:12] <xoom> just no way to escape from it
[07:13:13] <xoom> :)
[07:13:32] <xoom> if i want to change freq or waveform
[07:14:06] <xoom> its already implemented for escape
[07:14:21] <xoom> but i cant get in to atmega externaly
[07:14:48] <xoom> thats why im tryig to call TWI interrupt
[07:15:17] <xoom> but cant get it too :))
[07:16:00] <xoom> twie and twien is set.. sei(); is also
[07:19:12] <R0b0t1> Threaten to break out the debugger
[07:19:18] <R0b0t1> might scare the chip into submission
[07:21:17] <Horologium_> xoom, timer driven by external pin? or is that pin also on portD?
[07:24:13] <[z_z]> I'm trying to get a handle around the dfu bootloader. I've got the project loaded in avrstudio, but am confused. Where does the firmware check for the ISP condition? shouldn't there be a "if io condition start bootloader, or application instead" somewhere?
[07:26:35] <xoom> Horologium_ on PD also
[09:09:39] <megal0maniac> Hi all. Quick stupid question. I've defined F_CPU as 16000000 (16mhz) and using util/delay for delays, but the LED is flashing much faster than it should. Why?
[09:10:26] <megal0maniac> The CPU is running at 16mhz for sure. It's a mega32u2 so it can't even do more than that
[09:13:34] <megal0maniac> If I define F_CPU after the includes, then it blinks too slowly
[09:24:13] <megal0maniac> Figured it out. Rikus divided the clock freq by 2, and I put F_CPU in the wrong place :/
[09:48:57] <Malinuss> what in the world is "Rikus"?
[10:07:11] <tosmo> do ir receivers also react on visible light? so, could i build a remote control with a regular red or green led?
[10:08:49] <Malinuss> tosmo, no
[10:08:57] <Malinuss> tosmo, you could use a regular LED for that though
[10:09:50] <tosmo> i was just wondering wether i could remote control my dslr with a regular led (which i have lying around) or wheter i've got to grab an ir one ;)
[10:19:05] <hetii> Hi :)
[10:22:54] <hetii> I have some board from Video player with VFD tube and MSC1165 driver, in datasheet the Vhv is +65V, the tube is FIP8cdm7, but the question is how can i be sure that such voltage is not to high for this tube ? Also is there any lib that could help me control this 20-BIT ANODE/GRID DRIVER ?
[13:32:34] <tsmz> Hi, I'm having trouble getting the timer ISRs on an attiny85 to work properly. I do believe I made a stupid mistake somewhere in my code, is anyone willing to take a quick look?
[13:33:46] <tsmz> The problem: Due to not reading the datasheet beforehand, i have an LED connected to PB3 of an attiny85. I'd like to PWM this, so I implemented software PWM, but this doesn't seem to do anything. It's probably some horribly stupid mistake, though. Does anyone have an idea?: http://pastebin.ca/2348088
[13:34:13] <RikusW> will take a peek
[13:40:22] <RikusW> tsmz: looks more or less ok to me
[13:41:02] <tsmz> I'm extremely confused. What I expect to see is that the LED connected to PB3 changes brightness, but it seems to stay on permanently.
[13:42:41] <RikusW> tsmz: delete line after ISR(TIMER1_OVF_vect) {
[13:42:47] <RikusW> TCCR1 = 0;
[13:42:51] <RikusW> that one
[13:43:32] <RikusW> also you don't need TIMSK = (1<<OCIE1A);
[13:43:38] <RikusW> it should stay set
[13:44:14] <RikusW> ISR(TIMER1_OVF_vect) {        TCCR1 = 0;                                          // stop timer        PORTB &= ~(1<<PWM_OUT);    // clear on overflow -> turn on LED        OCR1A = dim_value;                              // update OCR1A        TIMSK = (1<<OCIE1A);                // clear OCR1A interrupt flag        TCCR1 = (1<<CS10) | (1<<CS11);    // restart timer}
[13:44:17] <RikusW> ooop
[13:45:06] <RikusW> ISR(TIMER1_OVF_vect)
[13:45:07] <RikusW> {
[13:45:07] <RikusW>         PORTB &= ~(1<<PWM_OUT);    // clear on overflow -> turn on LED
[13:45:07] <RikusW>         OCR1A = dim_value;                              // update OCR1A
[13:45:07] <RikusW> }
[13:45:09] <RikusW> that should do
[13:45:37] <RikusW> hmm still you set the TCCR1 correctly afterwards...
[13:46:06] <RikusW> tsmz: while in an ISR there cannot the I bit is cleared
[13:46:14] <RikusW> and set when returning
[13:46:32] <RikusW> so unless you do sei() inside an ISR it cannot be interrupted
[13:46:40] <tsmz> okay
[13:46:52] <RikusW> TIMSK = (1<<OCIE1A);                // clear OCR1A interrupt flag
[13:46:59] <RikusW> this line is probably the problem
[13:47:10] <RikusW> you disable TOIE1 here....
[13:48:02] <RikusW> and the interrupt flag is also cleared when returning from the ISR (automatic by the AVR)
[13:48:15] <RikusW> thats almost always the case
[13:55:39] <tsmz> it seems to work now.
[13:55:42] <tsmz> interesting.
[13:56:11] <RikusW> with modifications ?
[13:59:41] <tsmz> yes, basically just removed the stuff from TIMER1_OVF_vect
[13:59:57] <tsmz> quite confusing, I just added it because it didn't seem to work in the first place.
[14:02:55] <RikusW> at least its working now :)
[14:07:51] <vectory> hi, RikusW
[14:07:57] <vectory> how are you?
[14:09:05] <RikusW> hi vectory
[14:09:13] <RikusW> doing well, how about you ?
[14:10:07] * RikusW have been building some GPS/GSM stuff, using PCBs made by hackvana
[14:17:09] * RikusW wonders where vectory went....
[14:49:47] <vectory> RikusW: oh, im good :)
[14:49:54] <vectory> lazy as usual though
[14:50:48] <vectory> im in a microprocessor class now, so hopefully this board will be put to good use finally
[14:51:09] <RikusW> good :)
[14:51:44] <vectory> havin a bit of trouble with ebay atm. cant get around such bulky UIs :|
[14:51:58] * RikusW don't like that either...
[14:52:34] <RikusW> vectory: http://imgur.com/iuoyV4x
[14:52:41] <RikusW> top boards I made for U2S
[14:52:52] <RikusW> one is for HVPP using ST662
[14:53:03] <RikusW> the other is a level translator using GTL2000DL
[14:53:20] <RikusW> the third plugs in on top of the GTL board
[14:55:14] <RikusW> seems like we're on internet delay chat tonight ? ;)
[14:55:56] <vectory> i just _had_ to look at the other thumbs at imgur >_>
[14:56:25] <vectory> imgur is an evil time sink
[14:56:37] <RikusW> heh
[14:56:58] <RikusW> hackvana aka CapnKernel made those for me
[14:57:11] <vectory> yeah, nice to see that work
[14:58:00] <RikusW> I cheated, put 6 boards into one
[14:58:14] <RikusW> 10x10cm is about $36
[14:58:20] <RikusW> for 10 boards
[14:59:21] <antto> which app do i use to flash a bootloader on an atmega2561 via USBasp? avrdude? avrstudio?
[14:59:31] <RikusW> any one
[14:59:45] <RikusW> err, only avrdude works with USBasp
[14:59:57] <antto> oh
[15:05:42] <antto> installed winavr, but the avrdude in it is v5.10
[15:06:02] <antto> USBasp website says it works with avrdude 5.2 and up
[15:06:03] <antto> :/
[15:26:04] <vectory> antto: if 10 means 0xA, then thats higher than 2 :)
[16:28:46] <Malinuss> antto, you into uC's now?
[16:37:26] <antto> vectory very funny ;]
[16:41:10] <vectory> antto: i was serious, because i had the exat same misconception once. a programm expected not to work actually did
[16:43:48] <antto> so 5.10 is > than 5.2?
[17:15:47] <OndraSter> antto, yes
[17:16:00] <langoliers> OndraSter<< noo, i won't fix that, it is a piece of junk, tl494 switcher, and some lame amplifier
[17:16:02] <antto> yeah, i believe it now
[17:16:05] <langoliers> i can only use the aluminium case
[17:16:13] <langoliers> and maybe the toroid core...
[17:16:15] <OndraSter> oh langoliers
[17:16:39] <antto> i get "target doesn't answer 1" :/
[17:17:04] <langoliers> i have some TDA729x though, but still, i don't need amp now
[17:18:46] <langoliers> however an 500-2500W ACDC battery charger would fit in it for a windturbine
[17:18:59] <OndraSter> I am tempted to build some 2x40W optical receiver+amp
[17:19:12] <langoliers> oh, this is a HUGE onw
[17:19:35] <langoliers> thick aluminium, and about the size of a 19" rack
[18:26:34] <langoliers> i have read a webpage that states -u is needed when programming avr, otherwise avrdude can render the avr useless ...
[18:27:08] * R0b0t1 checks a makefile of his
[18:27:37] <R0b0t1> I use -U
[18:27:45] <R0b0t1> See manpage for what it means
[18:27:49] <R0b0t1> might be verify or something
[18:28:26] <langoliers> note - lower case -u
[18:28:42] <langoliers> -u -U ...
[18:28:54] <langoliers> to turn off some verifying after programming
[18:29:13] <tzanger> ? I use -U
[18:29:43] <langoliers> http://elecrom.wordpress.com/2009/04/15/avrdude-tutorial-burning-hex-files-using-usbasp-and-avrdude/#more-365
[18:29:45] <tzanger> e.g. avrdude -p c128 -c jtag1 -P /dev/ttyUSB0 -U flash:w:/tmp/shopctrl.hex
[18:29:47] <langoliers> still have it opened
[18:30:00] <langoliers> the guy says:
[18:30:01] <langoliers> -u : Disables the default behavior of reading out the fuses three times before programming, then verifying at the end of programming that the fuses have not changed. Always use this option. Many times it happens that we forget to switch on the AVR’s +5V power supply, then at the end of programming cycle, avrdude detects inconsistent fuses and tries to reprogram them. Since there is no power supply, fuses gets programmed incorr
[18:30:01] <langoliers> ectly and entire microcontroller gets screwed up(means becomes useless). Thus always use this option.
[18:30:41] <tzanger> langoliers: meh. I always have power on
[18:30:53] <tzanger> my biggest problem was blowing the reset disable on the tinys. :-)
[18:32:44] <langoliers> what surface do you use for your optical mouse ? ;/
[18:33:19] <langoliers> i don't know now my surface is bad (has too few reference points) or usb cable is broken, or wtf
[18:33:35] <tzanger> the tanned skin of my enemies.
[18:33:35] <langoliers> i move the mouse and it glitches
[18:41:02] <Valen> plain paper works really well
[18:41:11] <Valen> as a mouse surface
[18:41:25] <Valen> its texture they look at, not the surface itself basically
[18:41:42] <Horologium_> I use the arm of my recliner
[18:42:01] <langoliers> yeah, i have a white painted surface, but it become shiny and smooth
[18:42:16] <Horologium_> so take some sandpaper to it.
[18:42:17] <Valen> bung a sheet of paper down and see
[18:42:17] <langoliers> maybe it is too smooth
[18:42:26] <Horologium_> or a couple different color sharpies.
[18:42:31] <Valen> I use a gel mouse pad and a "gamer" pad on the missus one
[18:42:41] <langoliers> Horologium_<< haha :) and if i paint with matte black it will be fine ?
[18:43:13] <langoliers> or that is too smooth too ?
[18:44:34] <Horologium_> metal flake blue.
[18:44:42] <Valen> paint will peel off pretty quick
[18:45:23] <langoliers> no if it is burned on
[18:46:10] <langoliers> i have heat resistant black and silver paints you can use up to 800C
[18:46:26] <langoliers> it needs 150C to cure it
[18:49:32] <langoliers> ok, what kind of texture is fine for a mouse sensor ?
[18:50:03] <Horologium_> the arm of a recliner works well.
[18:50:14] <Horologium_> or, a mouse pad.
[18:50:30] <Horologium_> piece of cardboard
[18:50:33] <Horologium_> sheet of paper.
[18:50:46] <Horologium_> back of your hand.
[18:50:47] <langoliers> kk trying
[19:09:30] <langoliers> nah looks like it is fine, cleaned the 10 year dirt from my mouse pad, and tried it on that, so looks like i have polished the surface so smooth the optical mouse can't find a reference point on it
[19:10:26] <langoliers> now i only have to make some PTFE sliders for it
[19:10:58] <langoliers> the problem is attaching the sliders to the bottom of mouse :)
[19:12:11] <Horologium_> arc welder.
[19:13:01] <langoliers> flaming the PTFE surface will make it epoxyable you think?
[19:13:10] <Horologium_> dunno
[19:13:20] <Horologium_> but would like to watch a video of you taking a torch to your mouse.
[19:13:30] <langoliers> :)
[19:14:22] <Valen> you cant glue to teflon basically
[19:15:18] <Horologium_> lag bolts?
[19:17:37] <langoliers> it should be very thin
[19:17:41] <langoliers> but that might work
[19:35:43] <TechIsCool> so has anyone played with the nrf24L01+ and RF24 lib?
[19:36:30] <Horologium_> I have some of the earlier ones
[19:36:38] <Horologium_> but wrote my own libs for them.
[19:36:43] <TechIsCool> ah alright
[19:36:54] <TechIsCool> I can't seem to get the ping/pong to work correctly
[19:37:13] <TechIsCool> which should work directly out of the box
[19:37:35] <Horologium_> assuming you have it hooked up right.
[19:37:41] <TechIsCool> correct
[20:12:05] <cluelessperson> can you guys help me get started with using an ASP programmer with an Atmega328P-PU and getting started with C?
[20:17:16] <timemage> cluelessperson, ASP = ISP ?
[20:17:26] <cluelessperson> yes
[20:17:42] <timemage> cluelessperson, do you have a particular question?
[20:21:25] <Tom_itx> cluelessperson, start here: http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_howto_main_index.php
[20:53:06] <langoliers> i suffer in cluelesslessness
[20:58:43] <langoliers> Horologium_<< don't worry i wouldn't care making teflon sliders on a $5 mouse :) or try to fix the cable
[23:32:30] <deeproot> hello
[23:32:47] <deeproot> im trying to use software serial with an attiny 44a pu
[23:33:10] <deeproot> i programmed the sketch with arduino and the sketch works fine but i only get back garbage on the serial monitor
[23:34:06] <deeproot> i have tried many speeds...i have the port deemed tx on the attiny connected to my rx pin on the arduino and i do get data but its trash
[23:34:16] <deeproot> i have run the burn bootloader to 8mhz
[23:37:51] <deeproot> also I have tried many baud rates and its just diff garbage
[23:41:15] <bsdfox\> deeproot, do you have F_CPU set properly?
[23:41:33] <bsdfox\> you might need to adjust the fuses
[23:42:57] <deeproot> I will read up on this.. I have never ran across the F_CPU term yet ( i am very newb) I have heard about adjusting the fuses but I thought the burn bootloader would fix that part