#avr | Logs for 2012-07-26

Back
[12:16:27] <dreamer> any tips on how to do software pwm?
[12:17:12] <xorm> create a counter loop that turns off at a certain number
[12:17:28] <xorm> but keeps running until it hits a fixed upper limit before resetting
[12:17:35] <xorm> or overflowing, whatever
[12:17:58] <Tom_itx> problem with software pwm is it has to handle all the other code you put inline as well
[12:18:01] <karlp> choose a chip with more pwm channels
[12:18:47] <SuperMiguel> to use my dragon as debug wire i have to check or uncheck dwen in the fuses?
[12:18:53] <Tom_itx> it relies on all the instructions in your loop to be just right
[12:19:07] <Tom_itx> SuperMiguel probably so
[12:19:20] <Tom_itx> don't forget to turn it off before leaving
[12:19:33] <dreamer> karlp: I only want to fade some leds, so no
[12:19:37] <SuperMiguel> Tom_itx: ?
[12:19:56] <Tom_itx> zdwen
[12:21:22] <SuperMiguel> Tom_itx: like I'm trying to connect the dragon to my stk500, but i have a 328p there, which doesn't support jtag, so my only option is debug wire right?
[12:22:14] <xorm> i've used timer interrupts to do create more PWM outputs than there are pwm channels
[12:22:33] <xorm> I think I did 8 channels out on an attiny2313
[12:23:06] <xorm> my method limited the usable on-time though
[12:23:13] <xorm> which is fine for servos
[12:23:34] <xorm> but crappy if you're doing power PWM
[12:32:09] <Tom_itx> SuperMiguel if you want to debug yes
[12:32:17] <Tom_itx> if you just want to program use the isp header
[12:33:29] <SuperMiguel> Tom_itx: yes i only want to debug with it but i keep getting an error
[12:33:46] <Tom_itx> i haven't used dw
[12:36:15] <awozniak> Is there an NAO option to show item weights in inventory and containers?
[13:01:46] <_abc_> Has anyone tested 328s and other avrs with a dvm on diode test to hunt down blown pins? Or maybe made a test jig to do that test?
[13:03:02] <_abc_> I have an unhappy returns problem. People bring back avrs which they claim are blown but they were okay when they left the shop. Not my shop. I need to make some device which can test the ics quickly. Like a sort of a programmer which just ensures the chip is responding and that all pins can be controlled?
[13:03:44] <_abc_> Is there such a thing?
[13:03:52] <_abc_> Preferrably open source/free
[13:08:07] <specing> _abc_: just flash in a led blinker?
[13:18:02] <OndraSter> awozniak_, relative of swozniak?
[13:18:35] <dreamer> guess not
[13:22:48] <awozniak> OndraSter: I'm under a court order not to discuss the matter.
[13:22:58] <OndraSter> lol
[13:23:24] <_abc_> specing: I would prefer all IOs to be tested for blown ones
[13:23:36] <_abc_> specing: even without power, to just see the bulk diodes you know
[13:24:04] <_abc_> Anyway I just tested a 328 like that and it refuses to enter programming mode, the read out sync bits are usually wrong, sometimes only by 1 bit
[13:24:20] <_abc_> Looks like its MOSI port got some damage somewhere.
[13:24:41] <_abc_> It can have the programming mode set to parallel HV only, however
[13:24:54] <_abc_> It is not my chip and I am too lazy to break out the tools now
[13:25:30] <_abc_> Can this happen with a 328? That it no longer responds to serial programming at all, including no sync and chip id bits readout, if the isp fuse is not set?
[13:27:32] <awozniak> OndraSter: "Wozniak" is the 7th most common surname in Poland. It's a bit like being named "Taylor" in the US. There's one in every city I've ever been to in the US. There was a Mike Wozniak on the local college basketball time for a while. I got confused by the first "Are you related to..." question there.
[13:27:52] <awozniak> OndraSter: and yeah, he's my Dad.
[13:28:03] <OndraSter> oh
[13:28:08] <awozniak> OndraSter: Maybe you've met him? Scott Wozniak?
[13:28:08] <OndraSter> (that is for the first line)
[13:28:12] <OndraSter> no
[13:28:15] <OndraSter> I am not from Poland
[13:28:30] <OndraSter> here is most common surname "Novák"
[13:28:45] <OndraSter> I know many of them (and many "Nováková" girls and ladies as well... mostly girls :D)
[13:28:46] <awozniak> OndraSter: My great grandma is a Novak
[13:28:54] <OndraSter> heh
[14:21:52] <SuperMiguel> so i have this code: http://ideone.com/rjfAA its running out of a 328p connected in my stk-500, but only leds 0 to 5 and turning on, LED 6 and 7 are off
[14:24:48] <specing> yuck standalone asm
[14:24:58] <specing> Have fun debugging that
[14:25:20] <SuperMiguel> specing: :p
[14:25:44] <SuperMiguel> specing: the avr debugging tool is to slow compared with my chip :(
[14:25:45] <specing> SuperMiguel: seriously, write it in C and then check the disassembly
[14:26:36] <SuperMiguel> specing: in the avr studio debugger it turns on all the pins, but not on my board :(
[14:27:34] <specing> rjmp delay1
[14:27:35] <specing>
[14:27:36] <specing> delay1:
[14:27:44] <specing> wtf is this inneficiency?
[14:29:37] <Steffanx> Delays and efficient ? :)
[14:30:26] <SuperMiguel> how else can i create delays in as,?
[14:30:30] <SuperMiguel> asm*
[14:31:42] <SuperMiguel> in c u have the lib, but in asm i think the best way and easiest way is to create a loop :)
[14:32:38] <specing> well...
[14:32:42] <specing> SuperMiguel: timers
[14:32:46] <specing> and
[14:32:49] <specing> USE C
[14:34:03] <SuperMiguel> ...
[14:36:21] <specing> also
[14:36:25] <specing> set a timer
[14:36:28] <specing> sleep()
[14:36:31] <specing> done
[14:36:46] <Steffanx> He should start somewhere ..
[14:36:56] <specing> yes, in main()
[14:36:56] <Steffanx> And perhaps skip the 'advanced' ways first
[14:37:31] <specing> He will first have to finish main()
[14:38:14] <Steffanx> Why? Because you say so?
[14:38:21] <specing> YES!
[14:38:29] <Corwin> :D
[14:39:05] <Steffanx> SuperMiguel i think you take a look on how others did it
[14:39:11] <_abc_> What is the difference between say atmega328 and atmega328P ?
[14:39:23] <_abc_> same, for atmega88a and atmega88pa
[14:39:27] <_abc_> just the case?
[14:39:34] <_abc_> *package?
[14:39:47] <Steffanx> power stuff
[14:40:01] <Steffanx> The is a post about the exact details somewhere on avrfreaks iirc
[14:40:42] <SuperMiguel> specing: ...
[14:41:07] <karlp> picopower!
[14:41:12] <SuperMiguel> specing: how many times dude? told u already that i don't want to use c
[14:41:43] <Steffanx> a is picopower too?
[14:41:56] <karlp> sometimes, depends whether they'd already used the A suffix
[14:42:12] <karlp> 168A is picopower for instance,
[14:44:44] <_abc_> ah
[14:44:58] <_abc_> but that has no impact on programming and so on?
[14:45:04] <_abc_> Only electrical characteristics?
[14:45:52] <abcminiuser> A suffice indicates a revised silicon process
[14:46:00] <Steffanx> Hee. abcminiuser is alive
[14:46:01] <_abc_> that much I knew
[14:46:01] <abcminiuser> *suffix
[14:46:17] <_abc_> P is always just for pico power, or does it also have other meanings?
[14:46:49] <abcminiuser> Pico IIRC
[14:46:58] <_abc_> ok, thanks
[14:47:12] <karlp> all P's are picopower, not all not Ps are not picopower ;)
[14:48:02] <abcminiuser> Ja
[14:48:07] <_abc_> heh 168pa has higher drain than 88pa ... makes sense, more silicon...
[14:48:29] <abcminiuser> *Grain of salt* if it was originally a non pico power design, the revised picopower design was released with the new P suffix
[14:48:35] <_abc_> the difference is about 5% less than a non pa...
[14:48:39] <abcminiuser> If it was picopower from the first release, no suffix
[14:48:40] <Tom_itx> holy moly
[14:48:43] <Tom_itx> it's abcminiuser!
[14:48:50] <Steffanx> hide!
[14:48:55] <_abc_> abcminiuser: curious, did my nick invoke you?
[14:49:01] <_abc_> yours does not light me up
[14:49:04] <_abc_> (irssi here)
[14:49:04] <abcminiuser> Sorry, our free internet router died for like 2 weeks
[14:49:19] <Tom_itx> and we thought you just didn't care anymore :(
[14:49:20] <abcminiuser> I had to use the library one, which IRC didn't like since it thought I was trying to proxy
[14:49:31] <_abc_> uhh
[14:49:43] <_abc_> you know abou the web gateway and about irc on the phone, right?
[14:49:46] <_abc_> *about
[14:50:06] <_abc_> well, does my nick highlight you or not?
[14:50:11] <_abc_> just curious
[14:50:26] <abcminiuser> Any mention of my full nick, name or LUFA does
[14:50:30] <abcminiuser> Thanks to SCIENCE
[14:50:41] <_abc_> they call regexps science now?
[14:50:48] <_abc_> it's a black art, damnit
[14:50:50] <_abc_> :)
[14:50:50] <Steffanx> strstr :)
[14:51:56] <_abc_> can someone quickly say how I issue a restart on an atmega twi?
[14:54:25] <Steffanx> reset the avr .. quick enough?
[14:55:52] <Steffanx> ignore me :)
[14:56:42] <specing> _abc_: you have summoned him
[14:56:43] <_abc_> I hate I2C buses
[14:56:55] <_abc_> they were all the rage in 1970, we are in 2012 now
[14:57:18] <_abc_> just (re)did a i2c master in pic assembly the other day, for the umpteenth time, bit banged.
[14:57:26] <_abc_> Slow c**p SPI flies hoops around it
[14:57:40] <_abc_> ^ there should be a comma in there
[14:57:59] <_abc_> also whoever came up with the restart trick to read a SEEPROM must be a masochist.
[15:00:24] <_abc_> baarf i found the way it is done, page 230 of 567 in 328 manual
[15:00:27] <_abc_> uhh
[15:01:01] <OndraSter> restart trick to read SEEPROM?
[15:01:08] <_abc_> Indeed
[15:01:13] <OndraSter> sounds nasty
[15:01:15] <_abc_> Take a look at a 24c01 datasheet
[15:01:28] <_abc_> 'how to read a random byte'
[15:01:36] <_abc_> The sequence is shown graphically
[15:01:46] <_abc_> OndraSter: you never had to do this?!
[15:01:51] <OndraSter> I never used I2C
[15:01:52] <OndraSter> lucky me
[15:01:55] <OndraSter> I always used SPI :)
[15:01:55] <_abc_> yes!
[15:01:56] <specing> Hehe
[15:02:09] <_abc_> heck SPI at 5MHz is 10 times faster than i2c
[15:02:15] <_abc_> and 5MHz SPI is so 1980s
[15:02:26] <_abc_> I use SST serial flash which is rated 80MHz
[15:02:32] <_abc_> on SPI bus
[15:02:54] <specing> DAMN THATS FAST
[15:03:04] <_abc_> hmm?
[15:03:09] <_abc_> it is a little slow, actually
[15:03:26] <_abc_> serial flash is used for some palmtops, they boot their bios from it. Megabytes of it.
[15:03:47] <OndraSter> routers often have SPI flash :)
[15:03:53] <OndraSter> those bloody ones have CFI flashes :/
[15:03:57] <_abc_> 80MHz looks fast but it is only 10Mbyte/sec under optimal conditions. That is not 'fast'
[15:04:18] <OndraSter> yep :)
[15:04:19] <_abc_> CFI?
[15:04:25] <OndraSter> yes, CFI interface
[15:04:26] <OndraSter> it is bloody thing
[15:04:33] <_abc_> Card File?
[15:04:35] <OndraSter> 8bit parallel command/data interface
[15:04:39] <_abc_> the old thing?
[15:04:57] <_abc_> I don't know it. Or I know it under another name.
[15:04:57] <OndraSter> common flash memory interface
[15:04:59] <_abc_> Nvm.
[15:05:25] <OndraSter> BLOODY THING! I forgot that in vmware you can not run Hyper-V!
[15:05:34] <_abc_> ?
[15:05:44] <OndraSter> virtualize inside virtualization
[15:05:46] <OndraSter> VIRTUALCEPTION§
[15:06:03] <_abc_> Can you set up using tail recusion? >:)
[15:06:13] <_abc_> vm inside vm which is actually the first vm
[15:06:26] <OndraSter> the thing is - the target VM is actually Windows Phone 8 emulator :D
[15:06:30] <OndraSter> from today's leaked SDK
[15:06:32] <_abc_> You can probably do that but it would drive you insane
[15:06:43] <OndraSter> no it is not possible
[15:06:45] <_abc_> OndraSter: leaked? Officially?
[15:06:54] <_abc_> OndraSter: you can do it in qemu I think
[15:07:05] <OndraSter> leaked :)
[15:07:08] <_abc_> I use vbox.org and qemu
[15:07:13] <OndraSter> well it requires VT-x
[15:07:14] <OndraSter> and EPT
[15:07:32] <_abc_> Let me guess, Windows Phone 8 is loosely based on WinCE?
[15:07:37] <_abc_> Right?
[15:07:43] * _abc_ keeps barf bag ready
[15:07:52] <OndraSter> no
[15:07:57] <OndraSter> WP8 is already NT based :)
[15:08:01] <_abc_> O.o
[15:08:04] <OndraSter> yes, big change
[15:08:23] <_abc_> Wonderful. Does it come with an evaporative cooler to prevent phone meltdown?
[15:08:28] <OndraSter> why?
[15:08:31] <OndraSter> NT runs on many architectures
[15:08:33] <OndraSter> now including ARM
[15:08:36] * _abc_ thinks a vodka cooled phone could catch up quite quickly
[15:08:39] <OndraSter> :D
[15:10:25] <CapnKernel> Windows 8: "Why stop, just when I'm hating it"
[15:10:43] <SuperMiguel> how can i start a hardware debugger stopped? so i can do step into??
[15:11:00] <OndraSter> start & pause
[15:11:06] <OndraSter> there is button for that
[15:11:13] <asteve> facebook is teaming with HTC to make a facebook phone
[15:11:22] <asteve> i couldn't think of a phone I'd want to own less
[15:11:39] <CapnKernel> "Guys I have good news and bad news" "What's the good news?" "Windows 8 will drive Windows users into the arms of Linux like never before" "Oh, and what's the bad news" "Have you tried GNOME3 and/or Unity?"
[15:11:55] <OndraSter> lol
[15:12:02] <OndraSter> no, we did not try gnome3 or unity
[15:12:11] <OndraSter> my virtual gentoo hasn't gone past cli
[15:12:14] <CapnKernel> Good night all, 4am==sleepy time
[15:12:15] <specing> KILL THEM WITH FIRE
[15:12:16] <OndraSter> gn
[15:12:22] <OndraSter> specing, before they lay eggs?
[15:13:23] <SuperMiguel> OndraSter: where at?
[15:13:34] <OndraSter> hmm
[15:13:54] <OndraSter> it is "kill it with fire! before it lays eggs!"
[15:14:00] <OndraSter> so I only finished specing
[15:18:19] <SuperMiguel> OndraSter: no where in as4 says start and pause
[15:19:02] <OndraSter> ohh lol
[15:19:10] <OndraSter> no idea, I haven't used as4 in a long time
[15:19:13] <OndraSter> I switched to newer stuff
[15:19:26] <SuperMiguel> OndraSter: is it in 5?
[15:19:27] <SuperMiguel> 6?
[15:19:31] <OndraSter> 5 and 6 for sure
[15:19:35] <OndraSter> 4 for sure too, but I don't know where
[15:34:04] <SuperMiguel> why wouldn't all LED's turn on my stk500? http://ideone.com/5tu86
[15:53:39] <caytchen_> hey, adding an if to an ISR somehow causes that ISR to no longer function correctly. the generated assembly is at http://pastie.org/private/likonkerf47lm7vmr5bfwg
[15:54:06] <caytchen_> the variable at 0x40 is always set to 1; its initialized to 1 and I manually set it to 1 again before the ISR runs
[18:32:50] <SuperMiguel> are the leds on the stk500 wired backwards
[18:36:33] <Casper> if it was backward it would never turn on
[18:36:38] <Casper> but it could be active low
[19:04:53] <SuperMiguel> Casper, thats what i meant, since when i set DDR to 0xFF they are all off
[19:05:17] <Casper> you also need to set port
[19:05:41] <Tom_itx> either case ddr would be output
[19:05:49] <Casper> yup
[19:07:03] <SuperMiguel> ya port is also 0xff
[19:07:36] <SuperMiguel> Casper, u do avm asm right?
[19:08:04] <SuperMiguel> avr*
[19:08:41] <Casper> no, I can follow easy stuff, but I get lost in math :D
[19:09:07] <codematic> anyone here use LUFA ?
[19:09:20] <SuperMiguel> abc does :)
[19:09:42] <codematic> haha
[19:09:48] <codematic> hes the author right ?
[19:09:52] <SuperMiguel> ya
[19:10:53] <codematic> anyone know how the device LUFA stack should handle a usb_bulk_read when there isn' t any data to send ?
[19:53:06] <SuperMiguel> how can you do hardware debuging in linux?
[19:56:21] <Tom_itx> gdb?
[19:57:43] <SuperMiguel> gdb use hardware?
[19:58:04] <SuperMiguel> tought i could only simulate software
[19:59:42] <Tom_itx> i'm not sure
[21:25:12] <theBear> pretty sure you can make gdb do jtag kinda stuff, dunno how tho
[21:30:38] <w|zzy> https://www.youtube.com/watch?v=IwPWq9m0M6w
[21:30:43] <caytchen> so, what the hell is wrong with avr-gcc? why the fuck does it generate invalid opcodes for memory access with attiny20?
[21:50:27] <Casper> is the tiny20 supported?
[21:51:06] <theBear> i was just wondering, i thought it was one of the ones with the silly ram too small for gcc
[21:51:27] <caytchen> it has the stack on the SRAM
[21:51:53] <caytchen> and yes, its supported and code is usually fine, except when it tries to access globals with STS/LDS which are not supported in the attiny
[21:52:21] <caytchen> 128b of sram, no idea why that would be too small
[22:05:52] <Casper> 128b is really small you know
[22:05:56] <Casper> but shall be enought
[22:06:05] <caytchen> 128b is plenty