#avr | Logs for 2012-10-30

Back
[02:30:34] <elektrinis> hi
[02:30:42] <elektrinis> I have this strange problem
[02:31:15] <elektrinis> device with attiny45V will not program after reset pin is disabled.
[02:31:26] <elektrinis> I use AVR dragon with high voltage programming
[02:31:54] <elektrinis> other, very similar device with the same AVR chip works well
[02:37:30] <Sefid_par> How should I use avrdude to program avr using the programmer on this page:http://wiki.tldp.org/Avr-Microcontrollers-in-Linux-Howto
[02:45:11] <Richard_Cavell> elektrinis: the reset pin is used for programming
[02:45:29] <Richard_Cavell> You can only use high-voltage programming once your reset pin is disabled (ie used as GPIO)
[02:47:33] <elektrinis> i know that. hence my second sentence
[02:49:01] <Richard_Cavell> high voltage programming should always work
[02:49:33] <elektrinis> yes. this is why I ask why it doesnt
[02:50:02] <elektrinis> maybe there is common mistake I am doing
[02:54:25] <RLa> is there a simple oscillator in 7400 series?
[03:01:03] <RLa> god damn how i hate routing pcb
[03:01:13] <RLa> already got 6 dil16 packages on the pcb
[03:03:05] <RLa> need at least 2 more
[03:05:15] <RLa> 12 jumpers so far
[04:22:06] <Lionhearted> OndraSter, hello
[04:22:21] <OndraSter> ey
[04:22:23] <OndraSter> just came home
[04:22:32] <Lionhearted> OndraSter, im the cro guy
[04:22:52] <OndraSter> I figured
[04:22:53] <Lionhearted> OndraSter, from ystrday
[04:23:02] <Lionhearted> OndraSter, yea
[04:23:16] <Lionhearted> OndraSter, i started going deep in the avr-gcc
[04:26:02] <Lionhearted> i heared you started talking about using uint_8 if i remember correctly
[04:26:11] <Lionhearted> instead of using int
[04:26:22] <Lionhearted> *char
[04:26:42] <OndraSter> char = character, uint8_t = 8bits unsigned int
[04:27:01] <Lionhearted> OndraSter, but the uint8 are not standard C right?
[04:27:07] <OndraSter> no
[04:27:12] <Lionhearted> because
[04:27:13] <OndraSter> I don't remember what "int" defaults to on AVR
[04:27:24] <OndraSter> whether 8 or 32bit
[04:27:31] <Lionhearted> singed int 32 bit
[04:27:37] <Lionhearted> char is 8 bit
[04:27:54] <hackvana> "singed" means "burnt slightly"
[04:28:15] <Lionhearted> singed is the default
[04:29:32] <hackvana> hint: singed != signed
[04:30:04] <Lionhearted> my question was
[04:30:18] <Lionhearted> should i use thease "avr" uint8's ?
[04:30:30] <Lionhearted> or use standard C
[04:30:38] <OndraSter> uint8
[04:30:44] <OndraSter> you are sure that it is 8bits wide
[04:32:58] <hackvana> Lionhearted: Use the types you get from #include <stdint.h>: http://www.nongnu.org/avr-libc/user-manual/group__avr__stdint.html
[04:34:33] <hackvana> Lionhearted: On some platforms, a char is not 8-bit
[04:35:20] <hackvana> The types in stdint.h are standard C.
[04:35:35] <Tom_itx> typedef signed char int8_t;
[04:35:37] <Tom_itx> typedef signed int int16_t;
[04:35:51] <Tom_itx> typedef signed long int int32_t;
[04:36:55] <Tom_itx> typedef signed long long int int64_t;
[04:42:41] <OndraSter> mm I should buy optical switch
[04:42:43] <OndraSter> so I can take it apart :D
[04:47:13] <karlp> (int is 16bit on avr, not 8, not 32)
[04:50:51] <jadew> what do you guys recommend, liquid flux or flux pen?
[04:51:02] <jacekowski> i use resin
[04:51:23] <jacekowski> rosin*
[04:51:31] <OndraSter> rusin
[04:51:38] <jadew> the solid kind or liquid?
[04:51:43] <jacekowski> solid kind
[04:51:54] <jacekowski> kind you get from music store
[04:52:09] <jadew> I have that as well, but I want something I can easily spread over smd components
[04:52:23] <jacekowski> you don't want to do that
[04:52:30] <jacekowski> you can't leave liquid fluxes on board
[04:52:48] <jadew> I'll clean it up afterwards
[04:52:52] <jacekowski> flux is corrosive
[05:21:13] <hyoomin> Any of you know what my options are for disabling and reenabling the output of a timer to its pin so as to modulate the signal?
[05:25:01] <RLa> hyoomin, are you doing pwm signal generation?
[05:25:47] <RLa> some timers have compare/capture support to do it in hw
[05:25:54] <hyoomin> I have a timer putting out a carrier to a pin. I want to modulate that output, so I need to disable the output to that pin without disabling the timer.
[05:26:21] <RLa> hm
[05:26:38] <hyoomin> I want to do something like setting OC0A to 0b00, but I want to know if there's another option that doesn't have to set values in TCCR0A,
[05:26:55] <hyoomin> I'm trying to avoid changing my timer's settings.
[05:29:01] <OndraSter> hyoomin, you can disable it
[05:29:09] <OndraSter> but only via TCCR0A
[05:29:16] <OndraSter> OR setting the OCR to 0/255
[05:30:03] <hyoomin> Yes, but changing OCR disables the Carrier. I'd rather have it keep going and just turn the pin off.
[05:30:49] <hyoomin> So as far as you know, the only way to turn the pin off when it's set to output the timer signal is to set OC0A to 0b00?
[05:31:07] <OndraSter> yep
[05:31:22] <hyoomin> I'm surprised there isn't an override for the pin.
[05:31:30] <OndraSter> there is
[05:31:36] <OndraSter> force output compare
[05:31:51] <OndraSter> or disconnecting it via changing the OC pin function
[05:32:08] <hyoomin> No, that just triggers an output compare condition early, and you would have to do it repeatedly for every carrier period. :P
[05:32:16] <hyoomin> I'm talking about simply turning the pin off.
[05:32:29] <OndraSter> make it an input with external pulldown/up?
[05:32:56] <hyoomin> That would add hardware. Of course, the chip has an internal pullup already.
[05:33:22] <OndraSter> weak
[05:33:25] <OndraSter> 60kOhm or so
[05:33:53] <hyoomin> Sure. I was just hoping there was a similar thing to just ground the pin out.
[05:37:09] <hyoomin> Not that you know of, then?
[05:37:28] <OndraSter> nope
[05:40:22] <hyoomin> It seems like it should be a very basic feature to be able to turn your pins off. :P
[05:44:40] <karlp> hyoomin: sure, disconnect the timer, and write them low.
[05:44:50] <theBear> output set low with no load is a lot like being off
[05:45:22] <hyoomin> Yes, but my point is, there isn't a simple override for that.
[05:45:42] <theBear> it's err, never been an issue in all the years of cpu development :)
[05:46:06] <hyoomin> I would figure there would be a simple override that writes the pin low in spite of what it has been told to do previously.
[05:46:30] <theBear> why ? it's only one more bit/byte to do it properly
[05:47:01] <hyoomin> It's just the sort of thing I would put in a microcontroller, I suppose.
[05:47:27] <karlp> hyoomin: so, yeah, some mcus do have more ways of setting a pin.
[05:47:45] <karlp> your one doesnt, and you chose it....
[05:48:30] <karlp> external pulldown is really going to blow the budget?
[05:48:43] <hyoomin> The weight budget, yes. :)
[05:48:58] <hyoomin> But I suppose I'll just write to OC0A, then. :)
[05:51:30] <hyoomin> At least, if I don't find a better answer, though there probably isn't one. :P
[05:58:48] <karlp> weight budget? what parts are you using so far?
[05:59:01] <karlp> software's weightless man.
[06:01:19] <hackvana> Use the external pull-up. High is the new low.
[06:01:28] <hackvana> Sorry, internal pullup.
[06:11:00] <Horologium> inverted logic for the win.
[06:11:09] <Horologium> just look at copiers.
[06:11:20] <Horologium> all kinds of active low shit in there.
[06:18:34] <OndraSter> fast control signals are very often active low
[06:19:14] <Richard_Cavell> OndraSter: I was just talking about that here http://www.avrfreaks.net/index.php?name=PNphpBB2&file=viewtopic&p=1006192#1006192
[06:33:54] <mitsakos> hello has anybody used before any AVR with 2 Uarts and 1 spi/i2c ? I have found ATTiny1634 which has 2 UARTs and 1 I2C but the problem is if you want to work with I2C one UART has to be disabled
[06:34:07] <mitsakos> I want to use at the same time both UARTS and SPI/I2C
[06:34:38] <Horologium> is one of the uarts on the same pins as the spi/i2c?
[06:35:16] <RLa> hm, i'm using 324 which has two uarts and spi, and on separate pins
[06:35:25] <RLa> atmega324
[06:37:05] <OndraSter> spi != twi
[06:37:23] <Horologium> i2c=twi
[06:37:33] <RLa> tho one uart on it shares pins with int0/int1 :/
[06:37:55] <OndraSter> my atxmega has 7 UARTs and two? three? TWIs :D
[06:38:04] <OndraSter> any UART can work as SPI too
[06:38:09] <RLa> 7 uarts :)
[06:38:26] <OndraSter> interrupt on any pin
[06:38:57] <Horologium> mitsakos, the reason you have to disable the second uart to twi(i2c) is that RXD1 is on the same pin as SDA
[06:39:29] <Horologium> can not use two different functions on the same pin at the same time.
[06:40:41] <Horologium> if you used a chip with more pins, like the atmega324 or similar with dual UARTS then they don't use the same pins for UART and SPI and I2C generally.
[06:41:37] <RLa> huh, i just finished my hw multichannel pwm schematics
[06:42:00] <RLa> http://imgur.com/BdY8r will it work? :D
[06:42:57] <RLa> i wanted 8 channels but could not fit that many dil16 packages on eagle free version layout space
[06:44:10] <OndraSter> ugh what?
[06:44:43] <RLa> i want many channels and fast pwm
[06:45:03] <RLa> figured out that sw pwm on my 324 would be too slow
[06:45:16] <mitsakos> atmega324 looks as a good solution but it is has big a cost for what i want to do
[06:45:52] <Horologium> then go with software i2c or uart.
[06:46:01] <dunz0r> RLa; Can't you just use an atmega with more PWM-channels?
[06:46:29] <RLa> dunz0r, i can't solder smd
[06:46:55] <dunz0r> Sure you can.
[06:47:26] <Horologium> how many pwm channels you need?
[06:48:06] <RLa> 8
[06:48:33] <RLa> and i need one 16 bit timer for another purposes
[06:49:30] <RLa> that would leave me two timer and 4 pwm channels on atmega88 for example
[06:50:05] <Horologium> wouldn't two atmega88 chips be better than lots of discreets?
[06:50:15] <OndraSter> yep
[06:50:34] <Horologium> or even 2 atmega88 and something else as a supervisor.
[06:50:51] <OndraSter> tiny13a with software PWM?
[06:51:21] <RLa> i feel like wasting a mcu using it just dumb pwm
[06:51:39] <Horologium> look into it, might be cheaper and easier to do that.
[06:51:40] <karlp> get a bigger mcu.
[06:51:51] <karlp> oh, smd is out?
[06:51:53] <Horologium> heck, I use slave processors for all kinds of stuff.
[06:52:01] <RLa> hm, it might actually be cheaper indeed
[06:52:13] <OndraSter> the problem with discrete electronics
[06:52:14] <OndraSter> is that
[06:52:17] <OndraSter> if it is not right
[06:52:19] <RLa> unless i but logic in high quantites
[06:52:21] <OndraSter> you can not fix it :P
[06:52:26] <RLa> haha
[06:52:32] <dunz0r> RLa; There's quite a few models with 8+ PWM-channels. AT90PWM3B for example.
[06:52:48] <RLa> actually i have almost the complete layout ready for this circuit
[06:53:13] <RLa> i actually started from layout too if i can do it without crossing too many data lines
[06:53:21] <RLa> and it's doable :)
[06:53:26] <dunz0r> RLa; Or Atmega1280, Atmega128A, Atmega16U4, Atmega32U4 and Atmega640
[06:53:53] <dunz0r> I think at least one of those exist in DIP
[06:54:17] <OndraSter> 1280 does I think
[06:54:27] <OndraSter> but in DIP they tend to lack or share pins too much
[06:54:33] <OndraSter> usually just the ones you need
[06:54:37] <OndraSter> GET AN SMD!
[06:54:47] <dunz0r> Yeah. SMD saves so much space too.
[06:54:56] <RLa> hm, those parts all in smd :/
[06:55:04] <OndraSter> SMD is easy
[06:55:10] <OndraSter> unless you have got 0.5mm pitch
[06:55:43] <karlp> the end is nigh for hobbiestss refusing smd
[06:56:07] <RLa> hm, i might try
[06:56:24] <RLa> i will try with less leg count parts first
[06:56:45] <RLa> i have some sot23-5 devices i wanted to use here
[06:56:54] <RLa> i tried to make pcb, that was easy
[06:57:03] <karlp> easier even, no drilling
[06:57:13] <OndraSter> yep
[06:57:25] <RLa> http://imgur.com/Diw12
[06:57:41] <RLa> it has one bad error on it tho
[06:57:44] <dunz0r> The biggest drawback with SMD is that you need to make adapter boards etc when you want to test a circuit out before doing it "for reals"
[06:57:51] <RLa> it's mirrored
[06:58:00] <RLa> yes
[06:58:17] <OndraSter> I believe in my boards :D
[06:58:21] <dunz0r> RLa; Hehe, I've done that mistake quite a few times as well. Protip is to put text on the pcb, so you know which way it goes :)
[06:59:17] <RLa> i must remember to print upper layer in mirror
[06:59:40] <RLa> since tone transfer mirrors it too
[07:00:17] <RLa> i never mirror the bottom layer because it's already mirrored when i draw it
[07:06:03] <RLa> what about cpld?
[07:06:52] <OndraSter> you need programmer for those
[07:07:00] <OndraSter> and use big ass stuff
[07:07:06] <OndraSter> Quartus: download 2.5GB, installed about 10GB
[07:07:15] <OndraSter> no thanks
[07:07:20] <RLa> uh
[07:29:31] <RLa> hm, i think one can use modulo counter to generate pwm too
[07:30:36] <OndraSter> OR
[07:30:37] <OndraSter> second AVR:
[07:30:58] <OndraSter> .
[08:19:42] <dunz0r> Any reason I shouldn't get 3x Atmega644p for $14.50?
[08:22:03] <OndraSter> well
[08:22:05] <OndraSter> what for? :)
[08:22:37] <dunz0r> OndraSter; Robotics. I was just thinking there might be "newer" or "better" chips.
[08:22:45] <OndraSter> well there are
[08:22:47] <OndraSter> xmegas
[08:22:52] <OndraSter> I can offer you xboard coco
[08:22:56] <OndraSter> with xmega256a3u
[08:23:07] <OndraSter> atxmega*
[08:23:30] <dunz0r> Haven't used an atxmega yet.
[08:23:38] <OndraSter> good time to start then :)
[08:23:54] <OndraSter> 32MHz clock speed
[08:24:02] <OndraSter> I am pretty sure that it would run on 64MHz with all peripherals just fine :)
[08:24:10] <OndraSter> 256kB flash
[08:24:12] <OndraSter> 16kB RAM
[08:24:20] <OndraSter> fast dual ADC, DAC
[08:24:24] <dunz0r> Which programming interfaces does it support?
[08:24:28] <OndraSter> PDI and JTAG
[08:24:37] <dunz0r> I suspect the U means USB?
[08:24:38] <OndraSter> if you have dragon/avrisp mkII/jtagice3/jtagice mkII
[08:24:40] <OndraSter> yes
[08:24:43] <OndraSter> it has got USB bootloader
[08:24:45] <OndraSter> the ones I ship out
[08:24:54] <dunz0r> Oh nice. I like bootloaders :)
[08:25:02] <OndraSter> xmegas in stock do NOT have bootloaders though
[08:25:38] <dunz0r> OndraSter; I'll have to read the datasheet properly first. If you can get me a good price for ones with bootloader I might be interested :)
[08:25:57] <OndraSter> well since they are in 0.5mm pitch QFN I offer only assembled boards
[08:26:01] <OndraSter> with USB, LDO
[08:26:03] <OndraSter> headers
[08:26:07] <OndraSter> $32 shipped
[08:26:27] <dunz0r> OndraSter; Do you ship worldwide?
[08:26:28] <CapnKernel> Everything you need to get wiggy wit the XMega :-)
[08:26:32] <OndraSter> $32 worldwide
[08:26:41] <dunz0r> Sounds tempting :D
[08:26:47] <OndraSter> http://myxboard.net
[08:26:58] <OndraSter> I need to order parts though, I have shipped all I had in stock :D
[08:27:02] <OndraSter> I still have boards
[08:27:07] <OndraSter> but no USB ports or LDOs
[08:27:14] <OndraSter> nor polyfuses
[08:27:36] <dunz0r> The Xmega256A3U looks pretty sweet... I'll read the datasheet and get back to you, OndraSter.
[08:28:02] <OndraSter> sure
[08:34:32] <OndraSter> dunz0r, grab the "A3U" series datasheet, it contains stuff related only to the chip
[08:34:45] <OndraSter> AU series datasheet (28MB) contains for whole AU series and not all of it is in the A3U
[08:34:48] <OndraSter> (like external bus)
[08:34:59] <OndraSter> well, only external bus is extra on a1u
[08:35:07] <OndraSter> (plus another two DAC channels)
[10:07:47] <OndraSter> is there a list of AVR devices which do not set SPL/SPH on reset to RAMEND?
[10:09:54] <Steffanx> rikusw is our guy with all kinds of fancy lists Ondra
[10:09:57] <Steffanx> Ster
[10:12:22] <OndraSter> heh
[10:20:41] <DarthielleEU> OndraSter: 24/7 indeed
[10:28:56] <megal0maniac> 'lo all
[10:29:10] <OndraSter> lo
[10:30:12] <megal0maniac> Something went wrong. Launchpad is officially free :)
[10:30:48] <megal0maniac> Although I'm getting mails asking me to please pay
[11:18:45] <OndraSter> why is there
[11:18:47] <OndraSter> 10000!!!
[11:18:51] <OndraSter> tutorials on "patch"
[11:18:58] <OndraSter> but none of them mention HOW TO apply ALL patches from some folder?
[11:20:58] <OndraSter> for i in /path/to/patches/*.patch; do patch -p1 < $i; done
[11:20:59] <OndraSter> lovely
[11:22:32] <DarthielleEU> OndraSter: lovely
[13:44:46] <specing> Wooohoo
[13:44:58] <specing> Had to reboot this machine today
[13:45:06] <specing> It is now in a serious state of broken
[13:45:24] <specing> also forgot the password to one of the encrypted partitions...
[13:45:31] <specing> great joy.
[13:46:07] <megal0maniac> I have a launchpad and the download of the dev tools keeps failing
[13:46:39] <specing> heh
[13:46:51] <specing> I have an 1GB image of OpenIndiana and Im not sure what to do with it
[13:47:26] <megal0maniac> rm?
[13:47:45] <specing> Well atleast I can use it as my Java dev environment!
[13:48:00] <specing> Java is native on solaris, right? :)
[13:48:43] <ferdna> yeah
[13:49:06] <specing> cool then
[14:58:13] <other019> Hi
[15:00:20] <Steffanx> Lo
[15:00:31] <inkjetunito> hejsan
[15:02:34] <other019> I have some boards with stm32 microcontrolers which have JTAG programmer. Can I use it to program some AVR divices?
[15:03:55] <OndraSter_> no
[15:04:05] <other019> why?
[15:04:37] <OndraSter_> because the JTAG is "client"
[15:04:43] <OndraSter_> or do you mean the master programmer?
[15:04:52] <OndraSter_> I dare you to interface it to avr debug
[15:05:16] <specing> CHALLENGE ACCEPTED!
[15:05:37] <OndraSter_> that's the spirit
[15:05:44] <specing> :)
[15:05:54] <other019> i don't know what exaqly do U mean but there is st-link
[15:06:10] <Steffanx> No, you can't use that other019
[15:06:25] <Steffanx> What kind of board do you exactly have ?
[15:06:34] <Steffanx> stm32xx discovery?
[15:06:48] <other019> yup
[15:07:04] <Steffanx> That's not JTAG, those use SWD
[15:08:05] <other019> http://www.st.com/internet/evalboard/product/251168.jsp
[15:08:19] <other019> so why they mansion about JTAG
[15:08:26] <other019> ?
[15:08:36] <Steffanx> You have that one?
[15:08:56] <other019> nope
[15:09:24] <other019> but on cover they wrote it consist embedet st-link/v2
[15:09:50] <Steffanx> They call the fw on the new stm32discovery indeed stlink/v2, but that's without JTAG afaik
[15:09:50] <other019> so i was thinking they are similar
[15:10:09] <Steffanx> All you really have access to is SWD
[15:10:18] <Steffanx> *newer stm32 discovery boards
[15:10:41] <other019> ok i see it now there are some goldpins called SWD
[15:10:47] <other019> ok I'm sorry
[15:11:46] <other019> so what's the cheapest way to reach JTAG programmer or other which can debug
[15:12:02] <Steffanx> avrdragon
[15:12:49] <Steffanx> Or maybe a chinese crap clone jtagice-ish thing, but good luck with that :P
[15:13:16] <other019> yeah now i have avr isp mkII
[15:13:44] <other019> but it's to less when coder is so weak as me
[15:13:54] <Steffanx> heh
[15:14:56] <Steffanx> ( just stick with stm32 :P )
[15:16:04] <other019> what do U mean?
[15:17:52] <Steffanx> I meant, forget about AVR and use STM32 :P
[15:20:06] <other019> I'll try it when i fed up with avr's now i'm learning so U should know how helpfull will be cheap jtag programmer
[15:21:50] <specing> other019: what hidden force is preventing you from writing "you"?
[15:22:12] <Steffanx> U specing
[15:22:22] <other019> none I'm sorry if it's wrong
[15:56:15] <OndraSter_> http://www.theverge.com/2012/10/30/3577656/disney-buys-lucasfilm-plans-to-release-star-wars-episode-7-in-2015
[16:33:53] <OndraSter_> dilemma... port XBoard features onto arduino IDE
[16:34:05] <OndraSter_> and have them update the winavr to something newer that actually supports newer chips
[16:34:14] <OndraSter_> or use AS6 and cut off linux and mac os x support
[16:34:19] <OndraSter_> or write something custom in .NET/Mono
[16:41:48] <megal0maniac> HALP
[16:42:02] <OndraSter_> HALP HALP
[16:42:05] <OndraSter_> what have you done!
[16:42:09] <OndraSter_> YOU SPILLED THE MILK!
[16:42:12] <OndraSter_> go clean it
[16:42:13] <OndraSter_> NAO!
[16:42:16] <megal0maniac> :(
[16:46:15] <megal0ma1iac> HALP was because internet is broken. Thought maybe that might get through...
[16:46:18] <megal0ma1iac> zlog
[16:46:57] <specing> Oops, looks like I stepped on that cable again. Sorry!
[17:00:50] <megal0maniac> I give up. This stupid thing isn't working. Goodnight all
[17:04:17] <OndraSter_> lol
[18:06:46] <Horologium> http://hackaday.com/2012/10/30/extracting-data-with-keyboard-emulation/?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+hackaday%2FLgoM+%28Hack+a+Day%29&utm_content=Google+Reader
[18:11:13] <timemage> Horologium, the security part is a bit foolish.
[18:13:38] <Horologium> it was just a fun project I saw online..not mine.
[18:41:34] <Casper> Horologium: nothing new...
[22:16:24] <red_> Excuse me , Who know how to join the avr-libc project ?What's I need ?
[22:25:56] <Casper> know how to code is the prerequise probably
[22:26:03] <Casper> then just submit your patches
[22:26:41] <red_> I'm reading source code now
[22:27:14] <red_> and try to found some bugs
[22:28:56] <Landon> now that's dedication
[22:29:23] <Landon> and confidence in your headcompiler
[22:43:47] <red_> I learning embedded system in avr processor , so I want get some knowledge from it ,and submit my idea