#avr | Logs for 2013-08-19

Back
[07:19:46] <DrLuke> Ok guys, I'm seriously baffled at something: http://pastebin.com/eyRKhi2a
[07:20:14] <DrLuke> I am using util/delay.h and I defined F_CPU at 16000000UL before including delay.h
[07:20:25] <DrLuke> yet the delays are all wrong
[07:20:38] <DrLuke> the first delay actually works correctly, then the second takes 2.5 us instead of 1
[07:21:11] <DrLuke> and the whole for loop takes 25 us to execute once, but it should only be max 5 us... it's so strange :S
[07:24:31] <Joggl> ever thougt about, that commands themselfe need time too?
[07:24:43] <kdehl> Does anyone of you know whether the TI-83 used a regular 2.5 mm plug?
[07:25:22] <soul-d> well setting ports doesnt take that long probably not the div8 setting :P
[07:25:25] <DrLuke> Joggl: But so long?
[07:25:50] <DrLuke> sould-d I checked the fuses, they're all correct (xtal, no ckdiv8)
[07:26:10] <Joggl> takt a look at the assembler code
[07:26:18] <Joggl> so you can see what the compiler made out of your c-code
[07:26:27] <Joggl> and then look in the datasheet how many cycles eacht command takes
[07:26:32] <soul-d> also function without a return ; is scary
[07:26:41] <soul-d> you never know where it ends up
[07:29:36] <soul-d> but you do char i = 0 in the for loop ?
[07:29:41] <soul-d> doens't always stay 0
[07:30:10] <DrLuke> soul-d: I just initialized it
[07:30:26] <DrLuke> Joggl: I just checked, and I never realized how short a us really is...
[07:30:42] <Joggl> *hihi*
[07:31:04] <Joggl> i think 1us should be about 16 cycles, approxemitely ;)
[07:31:19] <DrLuke> this means that it'll be pretty hard to drive this LED driver with just 16MHz at my disposal :P
[07:31:31] <DrLuke> maybe if I unroll the for loop it'll be faster
[07:37:15] <masterq> you can alsa try to read the avr instruction set, for see how many instruction every instruction you use will use, and just use custom delay routines(or simply as many nop's as you need), for get an exactly timing
[07:38:04] <masterq> maybe inline assembler or -O0 for this file will be a good idear too
[07:40:29] <DrLuke> Yeah I think I'll do it with inline assembly
[12:56:06] <abcminiuser> Ahoyhoy sheeple
[12:56:40] <asteve> craaaab peeeeople
[14:20:36] <OndraSter> asteve, yes!
[14:20:39] <OndraSter> craaaab people
[14:58:43] <aep> hi, i've got an uc3-a3 evaluation board. can't really figure out how i'm supposed to flash it. through the jtag connection? the board just turns of when i connect jtag and the olimex flasher i have, and avrdude says "Unknown status 0x00"
[15:02:06] <RikusW> olimex mki clone ?
[15:02:11] <RikusW> that won't work at all
[15:02:32] <RikusW> use the onboard flip bootloader
[15:02:39] <aep> yeah that
[15:02:43] <aep> why wouldnt it work? :/
[15:02:56] <aep> yeah reading about the onboard thing.
[15:03:00] <RikusW> mki only support AVR 8 bit
[15:03:05] <RikusW> and only the old ones
[15:03:07] <aep> somehow i was mislead into thinking i need an exteranl programer oO
[15:03:14] <RikusW> is that olimex 5V ?
[15:03:21] <RikusW> or does it have a level translator ?
[15:03:33] <aep> its got a switch for 3.3 and 5
[15:03:39] <RikusW> uc3a3 only support <=3.3V
[15:03:44] <RikusW> did you use 5V ?
[15:03:47] <aep> or maybe thats just for target power
[15:03:54] <aep> nope
[15:04:00] <RikusW> fortunate for you
[15:04:06] <aep> heh
[15:04:18] <aep> ok so generally none of the 32bit avrs need external programers?
[15:04:33] <aep> then i wont bother learning to use one
[15:04:35] <RikusW> and I guess you shouldn't supply power to the 3a3 board other than through usb
[15:04:51] <RikusW> or maybe the pinheader, not quite sure
[15:04:59] <RikusW> I actually have one of those :)
[15:05:07] <RikusW> (3a3 xplain board)
[15:05:30] <RikusW> an AVRDragon can program it
[15:06:08] <aep> looks expensive
[15:06:14] <RikusW> $50
[15:06:22] <aep> oh
[15:06:49] <aep> ok well good, so at least i wont need one for the explained board
[15:07:53] <aep> apparantly pressing the button and using dfu-programer just works. heh
[15:08:04] <aep> will this work if i buy the chip later without the board?
[15:08:21] <RikusW> probably
[15:08:30] <RikusW> how are you going to solder it ?
[15:08:39] <aep> cool. that's a lot better than using an externl flasher
[15:08:42] <RikusW> its pretty tiny
[15:08:54] <aep> eh, they dont have a version that fits on a breadboard? :/
[15:09:01] <RikusW> no way
[15:09:07] <RikusW> only 0.5mm pitch tqfp
[15:09:12] <aep> i guess i can get a different model then?
[15:09:18] <RikusW> or qfn or bga
[15:09:30] <RikusW> no AVR32 comes in dip
[15:09:35] <aep> damn
[15:09:41] <aep> good to know
[15:09:56] <aep> how do hobby-people use it then?
[15:10:08] <RikusW> no idea
[15:10:12] <aep> hehe
[15:10:20] <RikusW> there is #avr32
[15:10:42] <RikusW> but its quiet in there
[15:10:53] <aep> indeed
[15:11:01] <aep> i guess no one really uses avr32?
[15:11:06] <RikusW> there are 2 Atmel employees in there too
[15:11:24] <aep> yeah, comunity support is why i want avr
[15:11:29] <RikusW> I know of someone using it commercially for gps tracking
[15:11:32] <aep> PICs just arent fun
[15:11:47] <RikusW> normal 8 bit AVR is a bit simpler to use
[15:11:52] <aep> hum
[15:11:58] <RikusW> Have you ever used AVR32 before ?
[15:12:54] <aep> no never
[15:13:03] <aep> in fact the only microcontroler i ever had was a pic16
[15:13:07] <RikusW> have you read the datasheets ?
[15:13:18] <aep> i'd be lieing if i said yes
[15:13:29] <RikusW> its more like ARM than AVR8
[15:13:31] <aep> i think i stopped reading at how many volts it wants :P
[15:13:49] <aep> yeah, i want something powerful
[15:14:01] <RikusW> (as far as the block diagram goes)
[15:14:05] <aep> but maybe its too much stuff for a hobbyist
[15:14:25] <RikusW> its got hi speed USB
[15:14:29] <aep> yeah thats cool
[15:15:08] <aep> and it can boot of its internal memory, right?
[15:15:20] <RikusW> yes
[15:15:22] <aep> arm has the disadvantage that it doesnt really work without a real board design :/
[15:16:06] <aep> maybe someone builds handy packages with arm32's
[15:16:09] <RikusW> hackvana fabricates boards
[15:16:26] <RikusW> you still have to do the design
[15:17:21] <aep> uh nice
[15:17:59] <RikusW> and he is fairly cheap too
[15:18:07] <RikusW> (compared to most other places)
[15:18:51] <aep> i prefer something i can plug into a breadboard for now though
[15:19:54] <aep> i guess someone builds them
[15:19:56] <aep> like that http://alvidi.de/avr32_module_bmb.html
[15:21:18] <aep> or maybe i should accept that i don't know what i'm doing and get an arduino :/
[17:08:12] <megal0maniac_afk> aep: Check out aery32
[17:10:25] <megal0maniac_afk> And ask in #aery32 whether they still have rev0 boards floating around. They have a nice board and a software framework which caters for novice-intermediate users
[17:14:49] <megal0maniac_afk> also, you'll need the atmel flip program if you want to use dfu. and it should show up as a device on your pc if really is going into bootloader mode