#avr | Logs for 2012-09-02

Back
[00:01:21] <uklta> isp is set to lowest
[00:01:36] <uklta> its a pu
[00:03:04] <Microboter> Not sure of that error code, has it programmed other chips ?
[00:03:13] <uklta> yes
[00:03:30] <uklta> it reads the clock bits fine
[00:03:35] <uklta> err fuses
[00:03:49] <Microboter> and it idents the chip as a p?
[00:04:02] <uklta> yeo
[00:04:05] <uklta> yep
[00:04:37] <Microboter> are you burning a hex files or something out of the assembler?
[00:04:42] <uklta> clock at 2.152 KhZ
[00:05:05] <uklta> When I choose production file it looks for .elf
[00:06:28] <Microboter> any chance you have jtag programming selected in the software but you are using isp?
[00:07:10] <uklta> where would I see that
[00:07:12] <uklta> (I am new to this)
[00:08:06] <Microboter> under tools you select device programming
[00:08:28] <uklta> It is set to AVR Dragon and ATmega328P and then ISP
[00:08:39] <uklta> Device sig is 0x1E950F
[00:08:41] <Microboter> from that menu you select the chip, then in the same window you select isp or jtag depending on what you have connected
[00:08:43] <uklta> voltage is 4.7
[00:09:06] <Microboter> erase entire chip before programming?
[00:09:29] <uklta> k erased work
[00:09:38] <uklta> do I program through memories or through production file
[00:10:28] <Microboter> memories and use the hex file
[00:11:09] <uklta> An error occured while executing command with ID 0x14. ISP command failed
[00:11:20] <uklta> Timestamp: 2012-09-01 23:59:33.848 Severity: ERROR ComponentId: 20100 StatusCode: 1 ModuleName: TCF command: Modules:writeToMemory failed.
[00:12:08] <Microboter> was the file compiled for the 328p?
[00:12:28] <uklta> ill start over with a new project
[00:12:37] <Microboter> might be better :)
[00:12:47] <uklta> New project, then GCC C Executable right?
[00:13:49] <Microboter> there is a way to build and program out of studio with just a click. click on start without debugging in the toolbar
[00:14:01] <Microboter> will compile and program the chip all at once
[00:14:27] <Microboter> and yep on the other question
[00:14:56] <Microboter> it looks like a play button with a = in front of it
[00:15:39] <uklta> How do I know if it burned it to the chip?
[00:16:15] <Microboter> in the bottom text bar it was say succeeded
[00:16:58] <uklta> "Failed to launch program
[00:17:09] <uklta> Got 0xc0, expected 0x00
[00:17:54] <Microboter> got me there. you might watch some of the tutorials on avr studio on youtube. that help me a bunch
[00:18:20] <uklta> What is your programming setup like? Do you use a target board?
[00:18:24] <uklta> Or just a breadboard
[00:18:47] <Microboter> avr dragon and i build my own controllers
[00:19:22] <uklta> Any pictures?
[00:19:38] <Microboter> http://tomanyhobbies.com/coppermine/displayimage.php?album=5&pid=84#top_display_media
[00:20:50] <Microboter> http://tomanyhobbies.com/coppermine/displayimage.php?album=2&pid=274#top_display_media
[00:24:28] <uklta> so that is what you program them on?
[00:25:24] <Microboter> No the atmega644pa is soldered to the board it is smd
[00:25:46] <Microboter> i have an isp connector on the board
[00:26:55] <uklta> so what do you use when you program blank chips to test with?
[00:28:38] <Microboter> I never use dip style chips. So what you see is it. the first board is kinda like my own custom arduino I can connect that board to breadboards or shields via the header
[00:29:26] <uklta> nice
[00:29:32] <uklta> And you designed that yourself?
[00:29:40] <Microboter> yeah
[00:30:33] <Microboter> I am better at hardware then software. I am also just learning C
[00:30:45] <uklta> What do you reccomend for a beginner coming from Arduino?
[00:31:04] <uklta> should I just buy like a board already setup?
[00:31:06] <uklta> or
[00:31:18] <Casper> you can actually use any arduino board
[00:31:26] <Microboter> casper is right
[00:31:28] <Casper> just don't use their idiotic library
[00:31:36] <Microboter> just burn it on the isp connector
[00:31:36] <Casper> their bootloader is acceptable too
[00:31:43] <uklta> Oh I see
[00:32:24] <uklta> The reason I want to use standalone AVR is I am a freshman EE and I want to become really familiar with it all
[00:32:45] <uklta> So you think I should just use an Arduino as a development board and just use my AVR dragon to program it?
[00:32:45] <Casper> an arduino is really nothing more than an avr on a board with "arduino" stamped on it, with an arduino bootloader preflashed
[00:32:53] <uklta> Right
[00:32:59] <uklta> So it's like any other dev board
[00:33:03] <Casper> yes
[00:33:40] <Casper> but now, bed time
[00:33:42] <Casper> nite
[00:33:49] <uklta> So you think I should do that then instead of making my own board?
[00:34:56] <Casper> you can make your own, but if you already have an arduino, I'ld first try it, then when you excede the limit of that board then consider to make your
[00:34:58] <Microboter> if you are just starting yes
[00:35:01] * Casper goes to sleep
[00:36:02] <uklta> Awesome!
[00:36:16] <uklta> I am just going to go through the Arduino examples and port then to standalone AVR C
[00:41:27] <Microboter> good idea
[00:42:04] <uklta> I need to find a 6pin to 6pin isp
[00:42:09] <uklta> everyone as the 6 and 10
[00:47:25] <Microboter> I found some on ebay a few years ago cheap, bought 4 or 5
[00:59:19] <uklta> Microboter, how long have you been programming AVRs?
[01:00:16] <Microboter> humm, 4 years or so, but i started of with a basic language. Bascom. I have been teaching myself C for the last few months
[01:01:03] <Microboter> But i have been programming other mcu's for over 30 years.
[01:01:21] <uklta> Can you give me some tips on what you are doing to learn it ?
[01:01:36] <uklta> Like do you come up with projects to learn faster?
[01:01:39] <uklta> or stuff like that
[01:02:25] <Microboter> For me I dedicated all the programming for a bot I wanted to build to be done in C. So I have learned little sections as the bot has progressed
[01:02:46] <Microboter> pwm, timers, input, output, serial
[01:03:20] <Microboter> I work on one section until it works right then move on to the next
[01:04:03] <Microboter> http://tomanyhobbies.com/coppermine/displayimage.php?pid=277&fullsize=1
[01:05:06] <Microboter> learn how to use the simulator in studio 6. again there are some video tutorials for it on youtube. watch those for sure
[01:05:52] <uklta> Oh wow you got the camera working as well?
[01:06:22] <Microboter> next on my list :) I will start that this weekend
[01:06:28] <uklta> And that's a great idea
[01:06:34] <uklta> so you made the control board for the robot
[01:06:57] <Microboter> yep, the controller is under the color lcd display
[01:07:24] <uklta> Nice. Do you use any good online sources that aren't well known (like avrfreaks)
[01:08:52] <Microboter> not really. I have a couple sites booked marked that have a quick reference for C operators that I cant seem to get stuck in my head yet
[01:09:42] <Richard_Cavell> If you want to learn C, join ##c
[01:09:46] <Microboter> find code examples and hack them apart for the sections you need. You can learn quite a bit from that as well, program flow from others
[01:10:55] <uklta> Yea I feel like I don't know enough to do anything useful yet.
[01:11:04] <uklta> So for learning all this I still can just use the Arduino board
[01:11:30] <uklta> Also, richard I can't join C it says it is invite only
[01:11:46] <Richard_Cavell> uklta: do you have a registered nickname?
[01:11:53] <Microboter> yep, nothing beats leds and switches for learning. I add an led to every board i build so i can use it for debugging
[01:12:26] <uklta> Nice! Now I am excited. I am thinking of all the little things I can learn with (servos, POTS, etc)\
[01:13:38] <Richard_Cavell> uklta: You need a registered nickname to join ##c
[01:14:02] <uklta> Gotcha
[01:15:59] <Microboter> off to bed for me, good luck uklta
[01:16:14] <uklta> Thanks for all the help man!
[01:16:19] <Microboter> np
[03:48:57] <megal0maniac> I suspect I have flooded my engine http://i.imgur.com/rl7Cel.jpg
[03:50:10] <megal0maniac> (Relevant because my bike has an automatic voltage regulator - avr)
[06:16:53] <Richard_Cavell> How come on the Atmel website I can buy programmers but not the actual chips?
[06:28:48] <megal0maniac> Richard_Cavell: Atmel doesn't like to sell chips to end-users, because they typically sell them in quantaties of 1000+. The same is not true for programmers.
[06:29:02] <Richard_Cavell> I can buy the chips from Farnell here
[06:29:13] <Richard_Cavell> But the STK600 is $200 from Atmel and $460 from Farnell
[06:29:18] <megal0maniac> Exactly. They buy them in bulk.
[06:30:39] <Richard_Cavell> Well why don't I buy the chips from Farnell and the STK600 from Atmel?
[06:31:24] <megal0maniac> That would be the economical thing to do.
[06:33:43] <megal0maniac> I've bought chips from 3 different sources here, and it all depends on what chip you want and the quantity.
[06:35:22] <Richard_Cavell> Well I'm buying 4 atTiny85s and 4 atMega328Ps in DIP form
[06:35:35] * megal0maniac applauds
[06:35:42] <megal0maniac> Good choice :)
[06:36:38] <Richard_Cavell> Now I need the STK600 and the DIP socket card. Anything else?
[06:39:22] <megal0maniac> Not sure, never used or seen the STK600. Are you getting something like this? http://www.arrownac.com/parts/detail/43836312S9709382N3744
[06:39:37] <Richard_Cavell> Yeah, that's it
[06:39:53] <Richard_Cavell> Oh well I just have to wait for delivery now
[06:41:16] <megal0maniac> I have https://sites.google.com/site/megau2s/ and http://www.pololu.com/catalog/product/1300
[06:41:31] <megal0maniac> And then breadboards for prototyping
[06:41:44] <Richard_Cavell> ok cool
[06:41:48] <Richard_Cavell> I don't mind spending extra money
[06:41:54] <Richard_Cavell> This STK600 supposedly has LEDs all over the place
[06:43:44] <megal0maniac> I wouldn't mind spending extra money if I had extra money to spend ;) It looks like a complete development platform. Keen to hear your thoughts when it arrives
[07:04:59] <grummund> Richard_Cavell: if the STK500 supports what you need then I would go for that instead
[07:06:19] <Richard_Cavell> Well I already bought the 600
[07:06:25] <Richard_Cavell> And hey I'm happy to buy it if it does a great job
[07:07:09] <grummund> i have one too but I preferred the STK500
[07:08:51] <Richard_Cavell> Do I need to buy anything else?
[07:09:01] <Richard_Cavell> I have the socket card to program DIP chips, and all my chips are DIP
[07:09:37] <grummund> no that should be it so long as the card supports the devices you want
[07:09:55] <Richard_Cavell> I only want to work with DIP for now
[07:10:02] <Richard_Cavell> Cos I can solder the sockets
[07:10:04] <Richard_Cavell> into Veroboard
[07:13:48] <grummund> the same board can do tiny85 and mega328 ?
[07:13:58] <Richard_Cavell> yep
[07:14:05] <Richard_Cavell> It can also do AVR3
[07:14:06] <Richard_Cavell> 2
[07:14:13] <Richard_Cavell> It can program every AVR microcontroller
[07:14:39] <grummund> err, no... i meant the socket board for the micro.
[07:15:03] <Richard_Cavell> Um... I dunno
[07:15:14] <grummund> worth checking
[07:24:58] <grummund> looks like they need different routing cards
[07:25:16] <Richard_Cavell> hm, ok
[07:25:44] <grummund> ATtiny85 STK600-RC008T-2 STK600-DIP
[07:25:48] <OndraSterver> Richard_Cavell, didn't you say that you have bought some chips from Atmel yesterday? :P
[07:25:53] <grummund> ATmega324P STK600-RC040M-5 STK600-DIP
[07:26:05] <Richard_Cavell> OndraSterver: I bought some Atmel chips from Farnell
[07:26:09] <OndraSterver> oh
[07:26:16] <OndraSterver> Farnell sucks on pricing VERY HARD
[07:26:17] <Richard_Cavell> grummund: Okay so I need to get the other socket type then
[07:26:29] <Richard_Cavell> OndraSterver: Um, yes it does, but I'm only buying the chips from them
[07:26:49] <OndraSterver> why not mouser/digikey, if you are US based?
[07:26:51] <grummund> Richard_Cavell: it needs routing card AND socket card.
[07:26:56] <Richard_Cavell> OndraSterver: I'm in Australia
[07:26:58] <OndraSterver> ah
[07:27:02] <OndraSterver> check shipping to ozieland
[07:27:05] <Richard_Cavell> grummund: Okay now I'm confused
[07:27:23] <grummund> Richard_Cavell: they are stacked
[07:27:26] <OndraSterver> mouser has some 40€ for <150€ orders... lucky me, having local mouser reseller with no extra additional costs :)
[07:30:00] <Richard_Cavell> grummund: What I have is (ATSTK600-SC01)
[07:32:40] <Richard_Cavell> grummund: If I buy those two routing cards, will I be fine?
[07:35:24] <grummund> http://support.atmel.no/knowledgebase/avrstudiohelp/mergedProjects/STK600/index.html
[07:35:46] <grummund> Section 1. - look under Device Support
[07:36:12] <Richard_Cavell> Yep. I think the one you quoted for the 328p was wrong
[07:36:42] <grummund> ah weel, i did say ATmega324P ;)
[07:37:25] <grummund> ATmega328P STK600-RC028M-6 STK600-DIP
[07:38:02] <Richard_Cavell> alright so I need to buy them as well
[07:38:06] <Richard_Cavell> Gonna cost me another $50
[07:38:16] <Richard_Cavell> Anything else I need while I'm here?
[07:39:38] <grummund> i am not convinced that ATSTK600-SC01 is the same as STK600-DIP.
[07:40:32] <Richard_Cavell> http://store.atmel.com/PartDetail.aspx?q=p:10500229
[07:40:53] <Richard_Cavell> It's got STK600-DIP written on the actual card
[07:41:04] <Richard_Cavell> Click on the pic to get a high-res view
[07:41:22] <grummund> yeah ok that is it then
[07:41:47] <Richard_Cavell> So is the routing card to make sure the pins go to the right places?
[07:41:57] <Richard_Cavell> Like when you're programming in circuit and you push pins into the breadboard?
[07:42:21] <grummund> geez, you do know that STK500 does it all without needing the extra cards, and is cheaper and smaller ?
[07:43:19] <Richard_Cavell> I used to own them actually. Doesn't the STK500 have multiple places to plug in your chips?
[07:43:26] <grummund> yes
[07:44:13] <grummund> only downside is it does not support all the latest chips, and is RS232 not USB interface to the PC.
[07:44:28] <Harzilein> does anyone know who registered #avr.de?
[07:44:41] <Richard_Cavell> grummund: I think I'd like a USB connection
[07:44:49] <Richard_Cavell> That way I can program from my laptop
[07:44:58] <Harzilein> i'm pondering of moving over ircnet #avr.de to there, but it's empty and chanserv-protected :/
[07:45:19] <Richard_Cavell> grummund: Alright I bought the two cards
[07:45:25] <Richard_Cavell> Now I just wait
[07:45:33] <Richard_Cavell> Been waiting a week for my oscilloscope x(
[07:45:34] <grummund> Harzilein: /msg chanserv info <chan>
[07:45:58] <Harzilein> oh, thanks
[07:47:23] <grummund> Richard_Cavell: yeabut i would use a USB-RS232 cable in that case
[07:47:52] <Richard_Cavell> it's not the same
[07:47:56] <grummund> also STK600 does have JTAG
[07:48:14] <Richard_Cavell> Slow down boy I'm just gonna start blinking some LEDs first
[07:49:12] <grummund> yeah, just saying for DIP stuff with established AVRs i would have stuck with the STK500, mostly 'cos it's smaller and not so over-engineered.
[07:49:43] <Richard_Cavell> Fair enough
[07:49:53] <Richard_Cavell> I'm only gonna start with the atTiny85 though
[07:50:59] <grummund> well good luck :)
[07:51:27] <Richard_Cavell> thanks
[09:02:13] <Xata> hello
[09:02:13] <tobbor> Xata! like, totally tell us about the project!
[09:02:36] <Xata> tobbor: about wich one?
[09:02:59] <Xata> Synth? Controller? Binary clock (lol)?
[09:03:17] <Tom_itx> tobbor is a bot put there to annoy
[09:03:28] <Xata> oh, yes
[09:03:50] <Xata> forgot about this for 3rd time
[09:04:43] <Xata> Tom_itx: how do i inverse a port? so pin0 will be pin7, and vice versa
[09:05:18] <Xata> Any hardware method or ready function? or ihave to reverse my binary by hands?
[09:05:46] <Xata> i mean, *binary reverse my int.
[09:05:55] <nomis> Xata: you'll have to do it in code.
[09:06:35] <Xata> nomis: bwad, but my application has enough free cycles. t.hanks
[09:07:04] <nomis> http://graphics.stanford.edu/~seander/bithacks.html#ReverseParallel
[09:07:26] <nomis> trim that example down to 8 bits.
[09:10:50] <Tom_itx> http://www.avrfreaks.net/index.php?name=PNphpBB2&file=printview&t=65618&start=40
[09:12:23] <nomis> oh, the rol/ror-thing is neat!
[09:12:46] <OndraSterver> asm ftw :)
[09:52:16] <tomatto> hi
[09:52:16] <tobbor> hi tomatto.
[09:52:48] <tomatto> how can i do 100-150kHz pwm 8bit output with atmega8?
[09:53:19] <Tom_itx> set your timer period to that
[09:53:27] <Tom_itx> preset the timer to your percent
[09:53:53] <tomatto> i have no that clock source for that
[09:53:58] <Tom_itx> is one way
[09:54:23] <Tom_itx> prescalar won't get it?
[09:55:15] <tomatto> with 8MHz clock even with 16MHz clock it is too slow for it. when f = 255/F_CPU
[09:55:34] <tomatto> isn't it?
[09:55:40] <Tom_itx> for 100khz ??
[09:56:06] <tomatto> 100kHz 8bit pwm
[09:56:07] <Tom_itx> i didn't do the math but i bet it will
[09:56:17] <Tom_itx> 8 bit timer
[09:56:21] <tomatto> show me
[09:56:24] <Tom_itx> no
[09:56:47] <tomatto> i don't know or find way how to do it with atmega8
[09:56:49] <Microboter> sounds like abc's timer tutorial
[09:57:17] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/abcminiuser/articles/avr_timers_index.php
[09:57:23] <Tom_itx> then read part two after that
[09:57:34] <Tom_itx> i'm working on a project atm
[10:02:48] <tomatto> when i want 100kHz frequency output with 8MHz clock i can let timer count only to 79 instead of 256(8bit)
[10:06:49] <tomatto> Tom_itx: am i right?
[10:09:14] <tomatto> Microboter: it is not
[10:10:21] <Tom_itx> http://www.avrfreaks.net/index.php?module=PNphpBB2&file=viewtopic&t=649&highlight=
[10:11:30] <Tom_itx> http://www.avrfreaks.net/index.php?module=PNphpBB2&file=viewtopic&t=4323&highlight=
[10:20:32] <tomatto> Tom_itx: i don't see what from there article could help me.?
[10:20:43] <tomatto> these articles
[10:23:33] <Microboter> tomatto the 8 bit timer will not do what you want. the 16 bit one will. with the 16 bit you can select the top reset value to get precise 100 khz. the 8 bit timer does not have this ability
[10:23:40] <tomatto> there isn't anything helpful for solving my question
[10:24:17] <Microboter> you can get close, but not exact numbers
[10:24:35] <tomatto> Microboter: i am using 16bit timer i on atmega8 as two 8bit pwm phase correct channels
[10:26:09] <Microboter> look up ocr1, that is the register you need to play with
[10:26:50] <Microboter> along with the prescale
[10:27:45] <Microboter> google avr code for controlling servos. that is real close to what you are doing only a bit slower
[10:27:49] <tomatto> OCR1A/B registers setting duty cycle
[10:28:21] <Microboter> ICR1 sorry
[10:28:45] <Microboter> that is what its called in the bigger chips not sure with the mega8
[10:28:51] <tomatto> my pwm with timer1 is working, but slowly than i want
[10:29:00] <tomatto> Input Capture Register?
[10:29:27] <Microboter> google avr code for controlling servos. that is real close to what you are doing only a bit slower
[10:30:02] <Microboter> got to go, wife wants lunch
[10:30:13] <Tom_itx> feed wife
[10:30:16] <Tom_itx> keep wife happy
[10:30:20] <Tom_itx> golden rule
[10:31:37] <tomatto> what Waveform Generation Mode
[10:31:40] <tomatto> ?
[10:33:25] <tomatto> do you suggest for it?
[10:51:51] <jadew> Tom_itx, sorry, last night I went to bed
[10:52:12] <jadew> including the .inc files yields lots of errors related to the definitions there
[10:52:27] <jadew> since they're like .equ DDRB = 0xZZ
[10:52:37] <jadew> while avr-as expects .equ DDRB, 0xZZ
[10:52:54] <OndraSterver> AVR AS USES =
[10:52:55] <OndraSterver> caps
[10:53:06] <Tom_itx> mmm
[10:53:25] <Tom_itx> i thought others had used them ok, i've not tried it except on the T10 and a couple others
[10:53:44] <jadew> 1wire_slave.asm:2: Error: expected comma after "DDRB"
[10:53:50] <jadew> .equ DDRB = 0x17
[10:53:57] <jadew> that's with avr-as
[10:53:59] <OndraSterver> weird
[10:54:08] <tomatto> i can't figure out how can i get 100kHz 8bit pwm output. only way i know is to take around 32kHz. :(
[10:54:35] <jadew> tomatto, what cpu frequency?
[10:54:44] <tomatto> jevin: 8MHz
[10:54:51] <OndraSterver> on ovf preset the counter value to something
[10:55:23] <jadew> http://pastebin.com/QvEfH9Ab
[10:55:30] <tomatto> OndraSterver: when i need 8bit resolution?
[10:56:28] <jadew> the value in the last collumn gives you the CTC value you need to reach 100khz
[10:56:30] <OndraSterver> tomatto, oh
[10:56:48] <jadew> for the associated prescaler
[10:57:06] <OndraSterver> tomatto, atxmega :)
[10:57:20] <tomatto> OndraSterver: stop with it please
[10:57:30] <OndraSterver> with what?
[10:57:40] <tomatto> jadew: so i can have 8bit resolution?
[10:57:47] <tomatto> OndraSterver: with this atxmega thing
[10:57:50] <OndraSterver> why
[10:58:10] <OndraSterver> it solves your issue and is cheaper than atmega
[10:58:10] <tomatto> OndraSterver: because it is boring
[10:58:16] <tomatto> it isn't
[10:58:21] <tomatto> cheaper
[10:58:23] <OndraSterver> okay, what chip do you have now?
[10:58:32] <tomatto> like i said atmega8
[10:59:40] <Tom_itx> the obsolete one
[10:59:55] <tomatto> jadew: what timer setting do i need for?
[11:00:18] <tomatto> thanks.
[11:00:19] <jadew> tomatto, no, with that thing you'd get a 100khz pulse, that's it
[11:00:45] <jadew> let me think about something
[11:00:55] <tomatto> jadew: i need 100khz 8bit pwm no pulses
[11:01:11] <OndraSterver> atmega88 is more expensive that atxmega16d4
[11:01:28] <OndraSterver> atmega8 is more expensive than atmega88 even
[11:01:34] <tomatto> i haven't atmega88
[11:01:53] <tomatto> my atmega8 cost under 1USD with shipping
[11:02:10] <Tom_itx> does it do the job?
[11:02:31] <jadew> tomatto, I don't think you can't get 8 bit pwm at 100khz
[11:02:32] <tomatto> Tom_itx: what job?
[11:03:07] <Tom_itx> what jadew said
[11:03:09] <jadew> 8000000 / 100000 = 80
[11:03:33] <jadew> so you only have 80 positions where you can switch the output
[11:03:42] <jadew> that's with the 1 prescaler
[11:03:58] <tomatto> jadew: thanks. i am little disappointed, but thanks you for honesty
[11:04:19] <jadew> tomatto, why do you need 100khz tho?
[11:04:44] <jadew> you can usually do with less
[11:05:12] <tomatto> jadew: switching regulator. 31kHz is too little for coil
[11:05:27] <tomatto> it is too hot now
[11:06:15] <jadew> I see
[11:06:16] <tomatto> Tom_itx: first time when i asked, you said that i can do it, now you said that no. great
[11:07:18] <Tom_itx> i figured you could but i didn't put numbers to it
[11:07:18] <jadew> tomatto, I'm really not an expert, but I think that for 100khz you need a 100000 * 256 clock
[11:07:22] <Kevin`> tomatto: do you really need 8 bit? you could just reduce the end value to get any frequency. or, does your chip have a 16bit timer, or pll perhaps?
[11:07:27] <tomatto> jadew: 6bit resolution is not good isn't it?
[11:08:26] <jadew> tomatto, let me run the numbers
[11:08:34] <jadew> 6 bit = 64, right?
[11:09:57] <tomatto> Kevin`: my chip atmega8 has 16bit timer, but 8MHz is not too much. i can add 16MHz clock but it is not much too
[11:10:43] <tomatto> jadew: as you said 80, i put it to resolution nearest to it. yeah
[11:11:50] <jadew> I haven't played with PWM in a while, but F_CPU / prescaler = PWM frequency, right?
[11:12:19] <jadew> or not
[11:12:27] <tomatto> no
[11:12:53] <tomatto> F_CPU/PWM frequency = max counter value from zero
[11:14:59] <tomatto> or pwm freq = F_CPU / resolution in bits
[11:16:48] <jadew> you could try and see if you can go 0-79
[11:20:57] <specing> tomatto: attinyX5 = 64Mhz peripheral clock = darn fast PWM
[11:21:13] <specing> or go for an xmega or an arm
[11:25:59] <OndraSterver> watch out, some ARMs have got slow IO output change speed!
[11:28:39] <tomatto> attinyX5 looks good but i need more pins
[11:29:57] <specing> t44?
[11:30:04] <specing> check if it has 64MHz
[11:30:38] <specing> 17:54 < tomatto> jadew: switching regulator. 31kHz is too little for coil
[11:30:45] <specing> the coil is hot?
[11:30:57] <specing> thats weird
[11:31:22] <specing> Are you adjusting the duty cycle based on output sense?
[11:35:34] <tomatto> i am adjusting the duty cycle based on sense throw load
[11:36:01] <tomatto> and attinyX5 hasn't USART
[11:39:06] <tomatto> and t44 hasn't pll 64MHz
[11:39:15] <tomatto> specing: is it wrong?
[11:40:48] <xpololz> hmm, I've got a 12v 500mA power supply, now I'm looking for a voltage regulator with 5V output voltage fixed, however is "10V Primary Input Voltage" sufficient? also which package do I want for veroboard? TO-92?
[11:42:05] <specing> xpololz: 7805 and an smps for higher loads
[11:42:36] <Xata> About that invertion stuff i asked - look like the best way and cycles-safe way is making an array with values from 255 to 0, so u can use something like value = reverse_table[value]; to get the reversed int. ok only for 8-bit uC with enough memory for this
[11:42:37] <OndraSterver> to220 is better than to92, can do much more currents + is heatsinkable
[11:42:39] <OndraSterver> or SMPS
[11:42:54] <xpololz> farnell didn't let me pick to-220 :-/
[11:44:19] <Casper> need 5V? 7805
[11:44:31] <Tom_itx> anyone tried BLDC control on an xmega?
[11:44:40] <tomatto> specing: did you mean current over coil?
[11:44:41] <Casper> if you can't find them, change of supplier, it's one of the most common parts
[11:45:08] <xpololz> I was just not sure about the primary input voltage
[11:45:37] <xpololz> and spms let's me regulate output current?
[11:45:56] <xpololz> I found TO-220 now :)
[11:47:13] <xpololz> because my power supply outputs 12VDC
[11:47:26] <xpololz> wall wart..
[11:48:16] <Casper> xpololz: you don't need to regulate current unless you have special needs
[11:48:27] <Casper> all you have to care about for almost all devices is the voltage
[11:49:23] <xpololz> okay
[11:50:15] <Casper> basically, current limiting is needed for leds, battery charging and to prevent the regulator or the powersupply from frying in case of an overload or a short
[11:50:31] <xpololz> still these regulators has 10V Primary Input Voltage and my wall wart supplies 12VDC :-s
[11:50:39] <Casper> ?
[11:50:54] <Casper> the 7805 want 7-25V
[11:51:31] <xpololz> well, there's several different 7805's here :-)
[11:51:44] <xpololz> sorry I'm a newbie at this stuff
[11:53:29] <Casper> yes, several one, there is 3 packages possible for thru-holes (to92 = 100mA max, to220 = 1-1.5A max, to3 = whatever... old useless package now)
[11:54:27] <Casper> then you have different temperature range (ex, 0-65C, -20C-85C, -40C-85C)
[11:54:53] <Casper> isolated tabs or not, metal or plastic tab
[11:55:14] <Casper> and some more less important stuff
[11:55:26] <Casper> the plain 7805 in to220 do the trick
[11:56:07] <Casper> I like the 7805fp, it have a plastic tab, so isolated. But it have the disadvantage of handling less power (plastic don't conduct heat as good as metal)
[11:57:35] <xpololz> differences was mainly in "Voltage Regulator Type" and tolerances
[11:57:39] <xpololz> looking at TO-220 yeah
[11:57:53] <xpololz> also temperatures.. not important to me though
[12:34:25] <xam> Hi guys, anyone here who can help me with programming ATTiny85 with USBasp? I've been stuck for a day :(
[12:35:26] <xam> anyone?
[12:38:24] <GuShH_> xam: maybe some lube will get you unstuck
[12:38:50] <xam> anyone feeling more helpful?
[12:42:19] <OndraSterver> xam, define stuck
[12:44:53] <xam> Okay. So I got this USBasp and I'm trying to program my ATTiny85. All I get is "auto set sck period (because given equals null)"
[12:45:11] <xam> warning: cannot set sck period. please check for usbasp firmware update
[12:45:36] <xam> error: usbasp_transmit: Result too large
[12:45:51] <xam> error: programm_enable: target doesn't answer. 0
[12:46:05] <xam> initialisation faild, rc=-1
[12:46:21] <xam> I've check the connection a hundred times
[12:46:50] <jadew> xam, have you previously written that chip?
[12:46:55] <xam> MISO > MISO, MOSI > MOSI, GND > GND, VCC > VCC, RESET > RESET, SCK > SCK
[12:47:17] <xam> No. This is my first time with programming a chip
[12:47:21] <xam> I've done my homework
[12:47:26] <xam> researched a lot
[12:47:29] <jadew> and it's brand new?
[12:47:33] <xam> yes
[12:47:48] <jadew> strange
[12:48:03] <xam> I tried using the low speed SCK of USBasp as suggested in different forums
[12:48:11] <xam> but I'm not sure if I'm doing the right thing
[12:48:20] <jadew> are you programming it on a breadboard or something?
[12:48:27] <xam> breadboard
[12:48:58] <jadew> have you checked that everything makes contact?
[12:49:03] <xam> I can produce the schematic of my usbasp as well as the parts placement
[12:49:03] <jadew> and that there's no short?
[12:49:04] <xam> yes
[12:49:06] <xam> I did
[12:49:09] <xam> no shorts
[12:49:16] <xam> and everything has contact
[12:49:23] <jadew> do you have a scope?
[12:49:39] <xam> uhhh
[12:49:41] <xam> what's that?
[12:49:44] <jadew> oscilloscope
[12:50:07] <xam> I'm afraid no
[12:50:22] <xam> :(
[12:50:34] <jadew> hmm
[12:50:53] <xam> should the uC be connected to a power source?
[12:51:01] <xam> or the usbasp should produce it?
[12:51:03] <jadew> thing is programming usually works with out any issues, especially since you have a proper programmer
[12:51:20] <jadew> I think usbasp should power it
[12:51:35] <jadew> you can check if you get power between vcc and gnd
[12:51:58] <xam> there is power between vcc and gnd
[12:52:03] <jadew> you can either program it by providing your own power and disconnecting vcc
[12:52:07] <jadew> (from the programmer)
[12:52:12] <jadew> or letting the programmer power the uc
[12:52:25] <jadew> ok, so that's not it
[12:52:35] <jadew> is it a 10 pin socket?
[12:52:41] <jadew> or the 6 pin one
[12:53:37] <xam> its a 6-pin
[12:53:43] <xam> i check the connections again
[12:53:52] <xam> good contact with power bet vcc and gnd
[12:53:54] <jadew> that's good, cuz you don't have 4 grounds so you can't mess that up
[12:54:04] <jadew> the warning you get from avrdude + error: usbasp_transmit: Result too large
[12:54:14] <jadew> might suggest that you're not specifying the proper programmer
[12:54:25] <jadew> are you sure it's an avrasp?
[12:54:30] <xam> avrdude
[12:54:31] <jadew> usbasp
[12:54:44] <jadew> yeah, but I mean the hardware
[12:54:51] <xam> yeah yeah
[12:54:52] <xam> usbasp
[12:54:56] <xam> and this is the command i use
[12:55:17] <xam> avrdude -c usbasp -p attiny85 -v -U flash:w:main.hex:i
[12:55:50] <jadew> for now you can just do avrdude -c usbasp -p attiny85 to make sure it's connecting
[12:56:32] <jadew> give me a sec
[12:57:00] <xam> okay. I;m trying again
[12:57:18] <jadew> hold on
[12:57:25] <jadew> let's check the connections together
[12:57:44] <xam> okay
[12:57:46] <xam> that would be great
[12:58:23] <jadew> first of all, you are positive you identified correctly pin 1 on the ribbon cable?
[12:58:43] <xam> actually, I'm not using a ribbon cable
[12:59:00] <xam> its a usb wire with 6 headers
[12:59:25] <jadew> ok, do you know the order?
[12:59:30] <xam> yes
[12:59:45] <jadew> 1 3 5
[12:59:48] <jadew> 2 4 6
[13:00:07] <xam> yeah
[13:00:21] <xam> 1-miso
[13:00:25] <xam> 3-sck
[13:00:28] <jadew> ok, so pin 1 from the programmer, to which pin is it connected on the uC?
[13:00:32] <xam> 5-reset
[13:00:52] <xam> pin 1 (prof) goes to pin 6 of the attiny85
[13:00:59] <xam> *prog
[13:01:07] <jadew> ok
[13:01:08] <jadew> 2?
[13:01:51] <xam> 2 goes to pin 8
[13:01:52] <xam> vcc
[13:02:00] <jadew> ok
[13:02:01] <jadew> 3?
[13:02:14] <xam> 3 goes to pin 7
[13:02:18] <jadew> sounds good
[13:02:20] <jadew> 4?
[13:02:43] <xam> 4 to pin 5
[13:02:52] <jadew> 5?
[13:03:09] <xam> 5 (prog) to 1
[13:03:15] <jadew> and 6?
[13:03:35] <xam> 6 to pin 4
[13:03:45] <jadew> ok, so the connection seems to be fine
[13:03:59] <specing> -._
[13:04:07] <specing> I think literacy just dropped to null
[13:04:18] <xam> come on man. I'm new to this
[13:04:44] <jadew> the uC pins, are you sure you're counting them in the right order?
[13:05:11] <xam> yeah. from the side with the dot
[13:05:21] <xam> downwards 1-4
[13:05:31] <xam> and then opposite side, 5-8 upwards
[13:05:40] <jadew> yeah, that's correct
[13:06:18] <jadew> the only other issue that comes to mind is that it might need a clock, but since it's new it should work off of the internal clock
[13:06:27] <specing> d.a.t.a.s.h.e.e.t.
[13:07:48] <xam> this might be helpful. I get the same message whether I connect to the target uC or not
[13:08:02] <xam> so I think it does not see the uC
[13:09:28] <jadew> since you're getting those errors you can't really tell
[13:09:42] <jadew> it could either be the programmer, the connection or the uC
[13:10:01] <xam> damn
[13:10:09] <jadew> if you would be able to look at what's going on with a scope, you could take the programmer out of the equation
[13:10:33] <xam> problem is, I don't have a scope
[13:10:41] <xam> is there any other way to verify if the uC is good?
[13:11:36] <jadew> not really, you could try measuring the voltage on Reset
[13:11:51] <xam> okay
[13:11:54] <xam> I'll try that
[13:11:59] <jadew> but I don't think it will drop for long enough for the multimeter to notice that
[13:12:13] <jadew> during programming, the reset pin is low
[13:12:13] <GuShH_> wont
[13:12:19] <specing> xam: try another uC
[13:12:27] <specing> avrs are rather indestructible
[13:13:38] <xam> got a 5v bet reset and gnd
[13:13:42] <xam> is that normal?
[13:19:29] <xam> :(
[13:19:54] <jadew> yeah
[13:20:35] <jadew> I guess that tells you that the uC works
[13:20:49] <xam> how about using the low sck of the programmer
[13:21:08] <jadew> I don't know what that is
[13:21:44] <xam> low speed to make the uC keep up with the programmer
[13:21:53] <xam> use <1.5MHz
[13:27:40] <Yiq> Anyone here know CAN and CANopen?
[13:46:39] <raven> hi
[13:47:27] <raven> how to run an avrispmkii programmer using linux/avrdude (ubuntu 12.04)? all udev changes tried but still no success
[14:00:04] <raven> how to run an avrispmkii programmer using linux/avrdude (ubuntu 12.04)? all udev changes tried but still no success
[14:08:29] <Thetawaves> raven, what do you mean no success?
[14:08:55] <mbertens> hi all,
[14:09:12] <mbertens> anyone using a myAVR MK3 ?
[14:10:09] <raven> Thetawaves http://pastebin.com/jT9TqAAR
[14:10:37] <Thetawaves> you reboot/restart udev after your changes?
[14:10:57] <specing> You do not
[14:11:09] <Thetawaves> huh?
[14:11:10] <mbertens> when i play around with the GLCD, i got strange characters on the serial port ?
[14:11:22] <specing> Thetawaves: it picks up the changes automatically
[14:12:02] <raven> Thetawaves i did
[14:12:30] <Thetawaves> what do your rules look like?
[14:13:24] <Thetawaves> and what distro/version
[14:13:34] <chupas> are there any reccomended methods to measuing voltage with an ADC that exceedes the ADC supply?
[14:13:42] <Thetawaves> specing, it didn't pick up my new rules automatically.
[14:13:58] <specing> Thetawaves: it does, just replug the device
[14:14:04] <Thetawaves> chupas, resistor divider
[14:14:08] <chupas> thats it?
[14:14:14] <Thetawaves> chupas, with a zener diode to shunt excess voltage
[14:14:19] <Thetawaves> yes, thats it
[14:14:26] <chupas> simple enough, thanks!
[14:14:37] <Thetawaves> you can get all elite with isolation amplifiers and the such
[14:14:38] <raven> Thetawaves ubuntu 12.04 which rules-file do you need?
[14:14:40] <Thetawaves> but damn that's expensive
[14:14:58] <Thetawaves> raven, the one you just added
[14:15:11] <Thetawaves> specing, that sounds like way more work than restarting udev
[14:15:21] <specing> Thetawaves: udevadm trigger
[14:19:40] <raven> Thetawaves its the 2104: http://pastebin.com/T4bejSf0
[14:21:52] <Thetawaves> i've got a nearly identical file, except with sysfs because i'm still 11.10
[14:24:38] <tomatto> can i use some variable smaller than uint8_t ?
[14:24:54] <Thetawaves> tomatto, there is no variable smaller than unit8_t
[14:25:07] <Thetawaves> if you want to store bools, you'll have to store 8 of them at a time with unit8_t
[14:25:36] <raven> what could i try next?
[14:25:55] <tomatto> you mean uint8_t right?
[14:25:57] <Thetawaves> raven, any kind of errors in your udev log?
[14:26:06] <Thetawaves> tomatto, yeah
[14:26:10] <tomatto> ok
[14:27:09] <tomatto> Thetawaves: what do you think is faster?
[14:27:27] <raven> Thetawaves nothing in the logs
[14:27:41] <Thetawaves> the fastest way to store/access bools? one bool per uint8_t
[14:28:15] <Thetawaves> raven, is your user in the dialout group?
[14:28:22] <raven> Thetawaves yes
[14:28:40] <Thetawaves> aww fuck, are there any lights on on your avrisp?
[14:28:41] <tomatto> so storing more bools in uint8_t is kind of useless?
[14:28:58] <raven> Thetawaves the yellow poer led yes
[14:29:02] <raven> power
[14:29:46] <Thetawaves> tomatto, well, you can access individual bools like if (bool_multiplex & (1 << bool_you_want_to_test))
[14:30:11] <Thetawaves> tomatto, and that isn't a whole lot slower than if (bool_val)
[14:30:28] <raven> Thetawaves how to verify the error is software?
[14:30:31] <Thetawaves> you just said, in absolute terms, what is faster
[14:30:53] <Thetawaves> raven, well, i can tell from your error message that you really aren't talking to the programmer
[14:30:57] <tomatto> Thetawaves: but it is slower and more flash consuming than if(uint8_t) ?
[14:31:02] <raven> its the same error if no atmega is attached
[14:31:16] <Thetawaves> tomatto, slower and less ram consuming
[14:31:34] <raven> Thetawaves yes and reset stays high while avrdude runs
[14:31:48] <Thetawaves> raven, you should be getting a signature ID match failure if you can really talk to the avrisp
[14:32:19] <raven> next options?
[14:32:26] <Thetawaves> :S
[14:32:31] <tomatto> Thetawaves: how can i find out, that ram size isn't enough?
[14:32:35] <Thetawaves> at this point, it just worked for me raven
[14:32:58] <raven> thats a problem ^^
[14:33:10] <Thetawaves> tomatto, when your stack starts overwriting your global data, crazy unexplainable shit starts happening
[14:33:55] <raven> how to verify a hardware error then?
[14:33:59] <tomatto> Thetawaves: so after compilation, i don't know yet?
[14:34:06] <Thetawaves> right
[14:34:18] <raven> Thetawaves turns the red led on for a second if you plug it in?
[14:34:23] <Thetawaves> because your stack size isn't determined until runtime
[14:34:28] <Thetawaves> or perhaps you could simulate
[14:36:16] <Thetawaves> raven, only green lights flash on mine when i turn it on
[14:36:28] <raven> Thetawaves or perhaps an old bios on the chip? i have rev 2.9 from 11/2010
[14:36:49] <Thetawaves> i dunno, i'm no expert or anything
[14:37:13] <raven> which revision is yours?
[14:37:27] <Thetawaves> how do you check?
[14:37:46] <raven> its printed on there ^^
[14:37:51] <specing> tomatto: use GPIOrN to store bools
[14:38:03] <specing> one bool per bit
[14:38:39] <Thetawaves> what's GPIOrN?
[14:39:22] <specing> Thetawaves: d.a.t.a.s.h.e.e.t
[14:39:43] <Thetawaves> for what chip?
[14:39:49] <specing> your
[14:46:34] <Thetawaves> there is absolutely no text describing what these registers do in my datasheet
[14:47:01] <Thetawaves> internet seems to suggest that bit accessable memory is only up to 0x1F, and GPIOR1 and GPIOR2 are definitely a was above that
[14:47:12] <Thetawaves> ways
[14:48:31] <Thetawaves> raven, mine is from 05/2011
[14:49:53] <raven> which revision?
[15:01:35] <Thetawaves> doesn't say
[15:02:08] <raven> possible to use a testboard with an ftdi and an atmega88 to program another atmega8?
[15:03:14] <xpololz> hmm PTC - which values should this have? tripping current, holding current, max carrying current?
[15:03:31] <xpololz> <Casper> xpololz: you don't need to regulate current unless you have special needs
[15:03:34] <xpololz> :-s
[15:04:59] <specing> Thetawaves: The ATtiny2313 contains three General Purpose I/O Registers. These registers can be used for
[15:05:02] <specing> storing any information, and they are particularly useful for storing global variables and status
[15:05:05] <specing> flags. General Purpose I/O Registers within the address range 0x00 - 0x1F are directly bit-
[15:05:08] <specing> accessible using the SBI, CBI, SBIS, and SBIC instructions.
[15:08:53] <Tom_itx> raven, may be possible to program the 88 with the ftdi
[15:09:51] <raven> 88 and ftdi are on the same preassembled board
[15:09:59] <raven> i need to program a 8
[15:10:40] <raven> do i need to do any kind of reset-short the onboard 88?
[15:10:55] <Tom_itx> no idea
[15:11:05] <Tom_itx> i've heard some that have used the ftdi though
[15:11:20] <OndraSterver> ftdi ft232 or 2232 or something similar?
[15:11:21] <OndraSterver> or which ftdi?
[15:11:21] <raven> i will build it up anyhow
[15:11:29] <OndraSterver> because some of them have bitbang option :)
[15:11:33] <specing> OndraSterver!
[15:11:35] <specing> Hi
[15:11:42] <raven> ft232rl
[15:11:46] <OndraSterver> oh well hello there, specing
[15:12:01] <Tom_itx> OndraSterver don't you have an xmega board?
[15:12:02] <OndraSterver> isn't 232rl only serial, with few functions for each IO?
[15:12:06] <OndraSterver> Tom_itx, I do
[15:12:12] <Tom_itx> what's it look like, i forgot
[15:12:17] <Tom_itx> a dip thingy?
[15:12:18] <OndraSterver> xmega256a3u
[15:12:19] <OndraSterver> vreg
[15:12:22] <OndraSterver> into breadboard
[15:12:22] <OndraSterver> yes
[15:12:25] <Tom_itx> lemme see
[15:12:44] <OndraSterver> http://myxboard.net/boards.html
[15:12:45] <OndraSterver> coco
[15:12:45] <raven> OndraSterver yes but the 88 has the same connections with it i need for the 8
[15:12:55] <OndraSterver> huh, raven ?
[15:12:59] <Thetawaves> specing, so what is the purpose of GPIO registeres placed outside that range?
[15:13:15] <specing> Thetawaves: see last sentence
[15:13:27] <Thetawaves> placed OUTSIDE
[15:13:36] <specing> they are IN that range.
[15:13:39] <Thetawaves> no they aren't
[15:13:44] <OndraSterver> really?
[15:13:51] <Tom_itx> OndraSterver how hard is it to figure out the event system?
[15:13:54] <Tom_itx> and timers
[15:14:01] <OndraSterver> not much I'd say
[15:14:06] <OndraSterver> I haven't tried DMA, nor Event
[15:14:11] <OndraSterver> nor timers on xmega yet :D
[15:14:13] <Tom_itx> err how hard would it be to implement a BLDC controller?
[15:14:17] <OndraSterver> BLDC?
[15:14:21] <specing> Thetawaves: 0x13 - 0x15
[15:14:27] <Thetawaves> GPIOR1 (0x2A) GPIOR2 (0x2B)
[15:14:29] <Tom_itx> like a servo motor
[15:14:33] <OndraSterver> hmm
[15:14:36] <OndraSterver> hard to say
[15:14:40] <Tom_itx> 3phase i think
[15:14:46] <specing> Thetawaves: where did you get those addresses?
[15:14:50] <Thetawaves> from my datasheet.
[15:14:52] <OndraSterver> aren't there prebuilt ones with simple SPI interface etc?
[15:15:08] <specing> Thetawaves: which is?
[15:15:15] <Thetawaves> atmega1284p
[15:15:32] <specing> oh, I don't have one of those, sorry
[15:15:50] <Thetawaves> you don't have any megas in the 168-1284p series?
[15:16:07] <specing> I have a 168
[15:16:25] <specing> but the 168 is not the same series as 1284
[15:16:50] <Thetawaves> 164, whoops
[15:17:17] <OndraSterver> GPIOR0 is at 0x1E
[15:17:19] <OndraSterver> interesting
[15:20:26] <OndraSterver> http://www.ebay.com/itm/2-2-inch-240X320-dot-matrix-TFT-LCD-LCD-ILI9320-driver-IC-with-Figure-touch-/261091558415?pt=LH_DefaultDomain_0&hash=item3cca45040f
[15:20:29] <OndraSterver> this is so ridiculously cheap
[15:21:27] <megal0maniac> OndraSterver: So cheap I think you should buy me one as a gift :)
[15:21:33] <OndraSterver> pff :D
[15:21:54] <OndraSterver> 16bit parallel? Not a problem, I have enough IOs!
[15:22:25] <megal0maniac> What? With your atxmega? :P
[15:22:46] <OndraSterver> yep
[15:23:04] <OndraSterver> PA + PB + PC + PE + PF are full, then there is PD with 6bits and PR with 2 bits
[15:23:35] <megal0maniac> PCA8574 is what I use
[15:23:59] <OndraSterver> ah
[15:24:02] <OndraSterver> i2c bus expander
[15:24:07] <OndraSterver> how much do those cost?
[15:24:51] <Thetawaves> i2c is only 400khz
[15:25:05] <OndraSterver> some parts support 3.4MHz one :P
[15:25:22] <Thetawaves> do you have spi available?
[15:25:29] <OndraSterver> I don't mind taking it 2 ports
[15:25:34] <OndraSterver> I have still four ports left :P
[15:26:15] <megal0maniac> 400khz is enough for a 16x2 LCD
[15:26:47] <OndraSterver> :P
[15:26:59] <OndraSterver> or you could use that 1pin trick
[15:27:09] <OndraSterver> and use SPI shift register
[15:27:18] <OndraSterver> and with two capacitors and two resistors you need just one IO pin :P
[15:27:39] <megal0maniac> I use this http://www.dfrobot.com/index.php?route=product/product&product_id=593#.UEO-cUbpDfI
[15:28:00] <megal0maniac> (Which is where the PCA8574 comes from)
[15:30:36] <OndraSterver> buce :)
[15:30:37] <OndraSterver> nice
[15:34:04] <megal0maniac> Mainly useful for ATtiny85
[15:34:12] <megal0maniac> Also adds backlight control, which is nice
[15:34:23] <OndraSterver> :)
[15:34:35] <OndraSterver> one could hook up i2c DAC for backlight control :P
[15:34:42] <OndraSterver> or i2c r2r ladder
[15:34:53] <OndraSterver> with another addressable 8bit port
[15:36:27] <OndraSterver> well
[15:36:35] <OndraSterver> i2c dac 8bit is cheaper than PCA8574
[15:37:00] <OndraSterver> http://cz.mouser.com/ProductDetail/Microchip-Technology/MCP4706A3T-E-CH/?qs=sGAEpiMZZMu3rPAxViIS%252b41A1f7PKL3i
[15:37:01] <OndraSterver> bs
[15:37:03] <OndraSterver> vs
[15:37:07] <OndraSterver> http://cz.mouser.com/ProductDetail/NXP-Semiconductors/PCA8574APW118/?qs=sGAEpiMZZMtOwpHsRTkso%2fcD64k3AlJ42nhd5Pavm9Q%3d
[15:37:42] <OndraSterver> 12bit for 0,887€
[15:37:43] <OndraSterver> holy cow
[15:37:44] <OndraSterver> that is cheap
[15:38:19] <specing> 0.65 for me
[15:38:19] <OndraSterver> that is without any internal reference though
[15:39:36] <megal0maniac> Or I could just get an ATxmega :P
[15:39:41] <OndraSterver> or that :D
[15:39:44] <megal0maniac> With built in DACs
[15:39:45] <OndraSterver> with builtin DAC
[15:39:46] <OndraSterver> yep
[15:39:54] <megal0maniac> :/
[15:40:00] <specing> any xmegas in DIP yet?
[15:40:02] <OndraSterver> no
[15:40:03] <OndraSterver> well
[15:40:04] <OndraSterver> mine :P
[15:40:15] <megal0maniac> Yeah but we can't buy that
[15:40:16] <specing> We must push dean to push atmel
[15:40:22] <OndraSterver> megal0maniac, soon, sooon...
[15:40:29] <megal0maniac> Not enough of a market, I reckon
[15:41:06] <OndraSterver> I have got it all here.... boxes (without labels though), some bubblewrap, missing antistatic packages - but I can use meanwhile other ones
[15:41:09] <megal0maniac> Also, one can hand-solder TQFP :P
[15:41:16] <OndraSterver> these are QFN :P
[15:41:23] <OndraSterver> TQFP is goddamn big
[15:41:31] <OndraSterver> 44pin TQFP is the same size as 64pin QFN
[15:41:38] <OndraSterver> 0.8mm vs 0.5mm pitch
[15:42:09] <megal0maniac> And like 8pin DIP
[15:42:18] <megal0maniac> It's all relative
[15:42:20] <OndraSterver> hehe
[15:42:58] <OndraSterver> GUYS! Zumba, where are 5 girls right now, but it is on tuesday where I have nothing so far OR floorball on monday before another class, where I am right now all alone and will be joined by older dudes? :P
[15:43:36] <megal0maniac> I'm so confused by most of the words in that sentence...
[15:43:43] <OndraSterver> nvm then
[15:43:46] <Roklobsta_> he's excited
[15:44:04] <OndraSterver> Roklobsta_, has your nickname any relation to Rock Lobster?
[15:44:15] <megal0maniac> Phonetically, yes :P
[15:44:19] <OndraSterver> that's why I am asking :P
[15:44:21] <Roklobsta_> er yes
[15:44:35] <Roklobsta_> 9 chars coz of old irc rules for nicks.
[15:44:50] <OndraSterver> http://www.youtube.com/watch?v=oek8K1jdnB4
[15:44:55] <OndraSterver> this rock lobster? :P
[15:45:29] <OndraSterver> oh
[15:45:38] <OndraSterver> why did I so far always heard "rock lobster"
[15:45:42] <OndraSterver> when it is "iraq lobster"?
[15:45:52] <OndraSterver> and why does it loop? :D
[15:46:00] <Roklobsta> got more to do with an old amiga PCB name than anything else... when i used to lurk on #amiga
[15:46:08] <OndraSterver> mm amiga
[15:46:36] <Roklobsta> i've had this nick since.... 1992
[15:46:44] <Roklobsta> <ugh> 20 years of irc
[15:46:59] <OndraSterver> heh
[15:47:08] <megal0maniac> I've been alive since 1992...?
[15:47:08] <OndraSterver> it is 20 years since I was born ... barely :D
[15:47:33] <Roklobsta> yeah well ... i was skipping uni lectures in 1992 thanks to irc
[15:49:08] <OndraSterver> heh
[15:49:20] <OndraSterver> I will be skipping some lectures because they will be boring :D
[15:49:22] <OndraSterver> or stuff that I already know
[15:49:49] <Roklobsta> yeah calculus was boring
[15:50:04] <Roklobsta> no, thre lecturer was boring
[15:59:29] <Tom_itx> OndraSterver are those assembled and tested?
[15:59:42] <Tom_itx> or plain boards
[15:59:53] <OndraSterver> assembled and tested
[15:59:56] <OndraSterver> all the IOs
[16:00:12] <OndraSterver> I have only 3 modules though
[16:00:14] <Tom_itx> is that a good xmega chip?
[16:00:16] <OndraSterver> and one is missing ESD diodes
[16:00:17] <OndraSterver> well
[16:00:21] <OndraSterver> judge yourself :)
[16:00:24] <Tom_itx> i haven't looked at em
[16:00:29] <Tom_itx> how much is it?
[16:00:35] <OndraSterver> how much as..?
[16:00:52] <Tom_itx> coco
[16:00:58] <OndraSterver> as $$?
[16:01:02] <Tom_itx> uh huh
[16:01:12] <OndraSterver> or what "how much"?
[16:01:16] <Tom_itx> or quid or yen or franks or
[16:01:23] <OndraSterver> yes, money
[16:01:27] <OndraSterver> 25€ shippedinternational
[16:01:29] <OndraSterver> shipped international*
[16:01:40] <Tom_itx> 25 what?
[16:01:43] <OndraSterver> euro
[16:01:49] <Tom_itx> my brouser doesn't interpret that
[16:01:57] <Tom_itx> it says: a;sldkfja;sdha
[16:02:00] <OndraSterver> heh
[16:02:30] <Tom_itx> will it work with my programmer?
[16:02:33] <Tom_itx> :)
[16:02:38] <OndraSterver> there is no reason for it not t
[16:02:39] <OndraSterver> o
[16:02:44] <OndraSterver> check atmel studio's release notes, but it has PDI
[16:02:50] <OndraSterver> so there is no reason for it not to
[16:02:52] <Tom_itx> but will it?
[16:02:59] <OndraSterver> well I don't have your programmer :)
[16:03:13] <Tom_itx> i'm giving you the same crap i get
[16:03:16] <Tom_itx> :)
[16:03:19] <Tom_itx> ignorem me
[16:03:19] <OndraSterver> ah :D
[16:04:00] <Tom_itx> does it come with 24v level translators on it?
[16:04:10] <Tom_itx> so i can plug a motor into it?
[16:04:31] <OndraSterver> I can even include 10" thick wire for free!
[16:04:34] <megal0maniac> Tom_itx: Pent-up frustration, much? :)
[16:04:42] <Tom_itx> some days
[16:04:46] <Tom_itx> just not today
[16:05:18] <OndraSterver> I am dying here at http://www.youtube.com/watch?v=TT0Q-cPHfXw&feature=related
[16:05:20] <OndraSterver> dying of laughter
[16:05:22] <Tom_itx> OndraSterver, how big is the regulator?
[16:05:24] <Tom_itx> ma wise
[16:05:27] <Tom_itx> 200?
[16:05:30] <OndraSterver> 800
[16:05:36] <OndraSterver> aka more than USB can push
[16:05:37] <megal0maniac> What the hell?
[16:05:37] <Tom_itx> ok that's nice
[16:05:44] <megal0maniac> I'm half way through that video
[16:05:46] <OndraSterver> there is 500mA polyfuse on it
[16:06:01] <megal0maniac> It's a 1117
[16:06:05] <OndraSterver> ye
[16:06:30] <Tom_itx> if it had the puppy dog on it instead of the cat i'd get one
[16:06:49] <OndraSterver> I will have to order those small boards then :)
[16:07:01] <OndraSterver> I need somebody to make me a good deal on 25x50mm boards
[16:07:08] <OndraSterver> everybody prices them the same as 50x50 :(
[16:07:17] <Tom_itx> did you ask capn?
[16:07:19] <OndraSterver> yes
[16:07:26] <OndraSterver> even more expensive than iTead :(
[16:08:10] <OndraSterver> unless he could do slot right in the middle and I could separate them myself on the edges :)
[16:08:27] <Tom_itx> the slot needs to be .1" wide
[16:08:29] <Tom_itx> if you do
[16:08:34] <OndraSterver> I can fit that just fine
[16:08:35] <Tom_itx> for the router
[16:08:37] <OndraSterver> the boards are 23mm
[16:08:46] <Tom_itx> you can do tab routing yourself
[16:08:48] <OndraSterver> thus there is about 4mm width
[16:08:51] <OndraSterver> left
[16:09:29] <OndraSterver> I have got few boards that fit 25mm width actually :)
[16:32:57] <Tom_itx> what value are the internal pullups?
[16:33:01] <Tom_itx> anybody know?
[16:33:17] <Tom_itx> i know they're weak
[16:35:10] <megal0maniac> In what?
[16:38:19] <Tom_itx> avr8
[16:38:53] <megal0maniac> 20K - ~60K I think
[16:39:03] <megal0maniac> Reset pin was 10K - something
[16:42:03] <jadew> found a great use for pci sockets from old mother boards
[16:42:09] <jadew> LCD test sockets
[16:42:31] * megal0maniac has 2 dead motherboards behind him...
[16:42:34] <megal0maniac> Nice idea
[16:42:44] <jadew> I already built one, is great
[16:43:17] <jadew> you can take out every 1 collumn of pins
[16:43:25] <jadew> and you get pins spaced out at 2.50
[16:43:29] <jadew> which is just perfect
[16:43:32] <megal0maniac> Tom_itx: I know that 20K is minimum value.
[16:55:26] <OndraSterver> pullups are 20 - 40, reset is 30 - 60
[16:55:27] <OndraSterver> I think?
[16:55:31] <OndraSterver> it is in the datasheet
[16:55:35] <OndraSterver> in the first table even I think
[16:56:08] <megal0maniac> That sound more right
[16:57:22] <megal0maniac> *sounds
[16:57:57] <megal0maniac> ATmega328: 20-50 and 30-60
[16:58:12] <OndraSterver> ok, 20 - 50 for regular
[16:58:16] <OndraSterver> it is the same for xmega
[16:58:30] <OndraSterver> so I think that it is common across all later AVRs
[16:58:42] * megal0maniac is pretty sure that it is
[16:59:05] <megal0maniac> Really enjoying this U2S board from Rikus :)
[16:59:12] <OndraSterver> :)
[16:59:16] <OndraSterver> that was quickly shipped
[16:59:19] <OndraSterver> afterall
[16:59:24] <OndraSterver> it wasn't far was it
[16:59:32] <megal0maniac> Took just under a week
[16:59:41] <megal0maniac> Same country
[16:59:44] <OndraSterver> yep
[16:59:49] <OndraSterver> it is JAR, right?
[16:59:57] <megal0maniac> JAR?
[17:00:01] <OndraSterver> sorry
[17:00:04] <OndraSterver> that is the czech name
[17:00:09] <OndraSterver> I don't know the english one :)
[17:00:09] <megal0maniac> ZAR
[17:00:10] <OndraSterver> yes
[17:00:18] <megal0maniac> Which is dutch anyway :P
[17:00:28] <Steffanx> Afrikaans
[17:00:45] <OndraSterver> http://en.wikipedia.org/wiki/Zar
[17:00:46] <OndraSterver> lol
[17:00:58] <OndraSterver> Zar (České Budějovice District), a village in the Czech Republic
[17:01:16] <OndraSterver> yes, South African Republic
[17:01:21] <OndraSterver> = Jiho Africká Republika
[17:01:29] <OndraSterver> that's where JAR comes from
[17:01:47] <megal0maniac> Steffanx: No, Dutch
[17:01:57] <megal0maniac> Zuid
[17:02:02] <megal0maniac> Afrikaans would be Suid
[17:02:14] <Steffanx> So time to change it to SAR :P
[17:02:20] <OndraSterver> yep
[17:02:37] <megal0maniac> Anyway, it's extremely cool, that's all :)
[17:02:51] <OndraSterver> he is using LUFA presumably?
[17:03:11] <megal0maniac> Nope, wrote everything himself in ASM
[17:03:18] <OndraSterver> whole USB stack?
[17:03:33] <megal0maniac> It's CDC
[17:03:53] <OndraSterver> but still it is USB
[17:03:54] <megal0maniac> But I /think/ so
[17:03:56] <OndraSterver> holycow
[17:04:00] <OndraSterver> whole USB stack in assembly
[17:04:02] <OndraSterver> I thought about doing that
[17:04:17] <OndraSterver> because when I saw what avr-gcc produces even on highest optimalization level I was quite.. disgusted by some parts
[17:05:17] <megal0maniac> 9kb total, for STK500 programmer clone (with HVPP/HVSP support) and bootloader and USB-serial and jtag clone and some of debugwire
[17:05:28] <OndraSterver> nice :)
[17:05:29] <megal0maniac> Leaving 23kb for custom app
[17:05:48] <megal0maniac> I stuck LUFA based AVRISP in that space
[17:06:27] <megal0maniac> He also set it up so you can access the USB stack from app mode, or disable the stack if you have your own in the code (like LUFA)
[17:06:49] <megal0maniac> So if you write an app, the CDC stack is available to you
[17:06:59] <OndraSterver> I presume he provides some library with the USB stack itself and you just link it in your project?
[17:07:26] <megal0maniac> Yes. Oh, and there's a debug module too, where you can view and manipulate registers. Haven't played much with it yet
[17:07:42] <OndraSterver> nice :)
[17:08:25] <megal0maniac> Yeah. The documentation doesn't do it justice, though. When I first saw the page, I thought it was just a mega32u2 breakout
[17:14:44] <OndraSterver> I will have to ask him about whether it is all in asm or not
[17:14:50] <OndraSterver> because if it is - I will do mine in ASM as well!
[17:14:56] <megal0maniac> It is
[17:15:14] <OndraSterver> but I am not sure how would I go about doing import/export table in asm
[17:15:19] <OndraSterver> for future inclusion to C projects
[17:15:24] <OndraSterver> what is the site again?
[17:15:24] <megal0maniac> Everything except one code example, of which there is an ASM version as well
[17:15:38] <megal0maniac> https://sites.google.com/site/megau2s/home
[17:15:43] <OndraSterver> thanks
[17:16:14] <megal0maniac> Swap an xboard for one :P
[17:16:25] <OndraSterver> :D
[17:17:11] <megal0maniac> Well, I'm out. Good night
[17:17:17] <OndraSterver> gn
[17:17:22] <OndraSterver> damn it is 004 already
[17:17:23] <OndraSterver> 0004
[17:17:32] <megal0maniac> It is...
[17:17:45] <megal0maniac> Good morning then :)
[17:17:49] <OndraSterver> :D
[17:17:54] <OndraSterver> I need to get up 8 horus from now
[17:17:55] <OndraSterver> from*
[17:18:01] <OndraSterver> if I get lucid dream today as well I'll be happy
[17:18:25] <megal0maniac> It makes one feel more constructive in sleep
[17:24:25] <OndraSterver> interesting, he puts the builtin code links to the end of flash
[17:24:30] <OndraSterver> I'd put them to the end of RAM :)
[17:29:21] <OndraSterver> and move stack down by few bytes
[17:29:30] <OndraSterver> OR put them into flash
[17:29:35] <OndraSterver> that works as well okay
[17:39:40] <OndraSterver> I wish AVR would merge flash & data space
[17:39:48] <OndraSterver> with 16MB EBI it would be impressive!
[17:40:14] <OndraSterver> some 64kB flash to set up boot source and copy the data into RAM (or even bigger) and start it
[17:40:28] <OndraSterver> or some RTOS :)
[17:41:03] <Thetawaves> why would they merge flash and data space
[17:41:10] <OndraSterver> so you can execute from RAM
[17:41:15] <Thetawaves> it's a harvard architecture, it's this way by design
[17:41:20] <OndraSterver> yes
[17:41:33] <OndraSterver> it allows it to read from flash and RAM at once
[17:41:43] <OndraSterver> aka fetch next instruction while the current one is fetching data from RAM
[17:41:54] <OndraSterver> I do wonder if one can use lucid dreaming to help him solve some math or logic or whatever issues in some crazy way?
[19:33:38] <CapnKernel> OndraSterver: Works for some: http://en.wikipedia.org/wiki/Friedrich_August_Kekul%C3%A9_von_Stradonitz#Benzene
[19:51:34] <jadew> any idea why when I try to compile this http://pastebin.com/9FJhwxKK with avr-as -mmcu=attiny13 1wire_slave.asm
[19:51:44] <jadew> I get 1wire_slave.asm:4: Error: constant value required
[19:52:00] <jadew> however, if I say .equ DDRB, 0x17 it works
[19:52:14] <jadew> implying that <avr/io.h> gets ignored
[20:09:26] <timemage> jadew, assemblers don't usually use #include<> directives.
[20:09:51] <jadew> yeah, but most google hits suggested that it would work with avr-as
[20:10:33] <timemage> jadew, hmm. i guess i'd have to see those.
[20:10:39] <jadew> the ones that didn't suggest that, suggested to use the include files from avr studio, which appear to be using a different syntax for stuff
[20:11:16] <timemage> jadew, there may well be assembly include files. the won't look like the insides of a C include file. and you'll probably be using a directive more like .include
[20:11:52] <jadew> that's what I ment with the second statement
[20:12:17] <jadew> .including the avr .inc files doesn't work either
[20:12:33] <jadew> since those ones are using the .equ ASDF = 0x11 syntax
[20:12:42] <jadew> while avr-as expects .equ ASDF, 0x11
[20:13:06] <jadew> about #include <avr/io.h>
[20:13:35] <timemage> what about it?
[20:13:48] <jadew> when I asked where are the .inc files for the gnu tools
[20:13:59] <jadew> I was answered that I can use the .h files
[20:14:16] <jadew> and that's why there are no .inc files included with the gnu tools
[20:14:26] <jadew> and it makes sense, I just can't make the damn thing work
[20:15:28] <jadew> here's an example program: http://www.nongnu.org/avr-libc/examples/asmdemo/isrs.S
[20:16:00] <jadew> notice the c-like #includes
[20:17:28] <timemage> jadew, i do. and that would make minimal sense if you were manually running cpp on the files before running as. however, avr/io.h is still going to contain a pile of stuff that as won't understand. unless there's some magic in the header that i'm unaware of.
[20:18:11] <jadew> the only stuff in those hearders are preprocesor macros
[20:18:29] <jadew> so it shouldn't be hard to understand and use for the asm compiler
[20:19:00] <timemage> jadew, ok. then run cpp on the source file. take that output and feed it to gas.
[20:19:25] <jadew> File format not recognized
[20:20:33] <timemage> jadew, what command-line did you use to get that?
[20:20:51] <jadew> avr-g++ 1wire_slave.s
[20:21:18] <timemage> jadew, i meant cpp literally. cpp 1wire_slave.s > 1wire_slave.preprocessed.s
[20:21:29] <timemage> jadew, run the assembler on the preprocessed file.
[20:21:39] <timemage> jadew, somehow i doubt it will work, but at least you'll have tried the idea.
[20:22:37] <timemage> jadew, or, i guess avr-cpp.
[20:22:40] <jadew> yeah, I get unknown opcode typedef
[20:22:46] <jadew> yeah, that's what I ran
[20:24:26] <timemage> jadew, yup. well, maybe whatever environment they guy had in 2010 somehow managed to produce an an assembly file avr-as would accept. anyway, sounds like you should just go ahead and make your own .irc files.
[20:24:32] <jadew> I guess I'll need to convert the avr studio file to something avr-as can understand
[20:25:14] <jadew> yeah, making them is not that big of an issue, I just hoped I wouldn't have to do that
[20:29:48] <timemage> jadew, you might be able to semi-automate the process using a sed script or something similar.
[20:30:17] <jadew> I just replaced what needed to be replaced in the avr studio files
[20:41:48] <timemage> sed -n '/SFR/{s/\s*#\s*define\s\+\([^ \t]\+\).*SFR_IO[186](\([^)]\+\))/.equ \1, \2/p}' /usr/lib/avr/include/avr/iotnx5.h # probably grossly inadequate. if i were going to use something like that, i would probably just comment all of them out and uncomment them as I verified them. at least there's a fair amount of consistency in the header files.
[20:42:56] <jadew> I just replaced (\.equ\s*\w+\s*=) to \1, from the avr studio files ;)