#avr | Logs for 2016-02-07

Back
[02:47:57] <p0rt> hello
[02:48:12] <p0rt> I thuink I broke my mega 8
[02:48:27] <p0rt> when I'm trying tgo comunicate with it with avrdude
[02:48:40] <p0rt> it says rc=-1
[02:48:47] <p0rt> but connections are ok
[02:49:31] <p0rt> and when I force it to connect it gives me information about device signature which seems to change every time
[02:49:46] <p0rt> but generally it's 88something
[02:50:03] <p0rt> how to fix it?
[02:51:31] <p0rt> Oh, and everything was working till I changed clock source from 8MHz int. oscillator to 1MHz int. oscillator
[02:52:27] <p0rt> any help?
[02:54:06] <sebus> Clkdiv only? p0rt?
[02:54:11] <sebus> using avrdude?
[02:54:34] <p0rt> sebus: yeah, I flashed default fusebits
[02:54:42] <p0rt> with avrdude
[02:55:11] <sebus> first, check connection; second: try to lower communication frequency
[02:55:27] <sebus> 1 MHz osc means about 125kHz ISP programming speed
[02:55:38] <sebus> set -B 8.0 or something like that
[02:56:16] <sebus> or -B 20
[02:56:50] <p0rt> -B 8.0 worked
[02:56:56] <p0rt> but why?
[02:57:13] <sebus> as above explained
[02:57:35] <p0rt> oh, so avrdude defaults to 8MHz clock speed?
[02:57:54] <sebus> it shall work just fine, but sometimes it fails
[02:58:06] <p0rt> ok, thank you very much\
[02:58:56] <sebus> no problem
[02:59:49] <Jartza> p0rt: yea, -B parameter slows down the ISP communication, maximum speed is about 1/4th of cpu speed
[03:00:25] <p0rt> Jartza: I'll keep that in mind ;)
[03:02:20] <sebus> B 1.0 -> 1.5MHz; B 2.0 -> 750kHz; B 3.0 -> 375kHz; B 4.0 -> 187,5kHz; B 8.0 -> 93,75kHz
[03:02:40] <sebus> it was something like that for sck speed, don't remember exactly :D
[03:03:17] <p0rt> sebus: I'm gonna just chang3e clock speed :P
[03:06:12] * sebus always put 11.0592MHz crystals or 22.1184 ones
[03:08:08] <p0rt> Well, I was playing with avr for about a year and the stopped, now I want to get back to it so I pulled out my toys
[03:08:44] <sebus> hehe :-)
[03:16:36] <Jartza> -B4 usually works nicely for 1MHz
[03:18:13] <cehteh> -B16 on 128khz works too .. making it insanely slow works around a lot problems, as long there is a clock you can recover fuses with that
[03:22:22] <sebus> cehteh B20.96 runs your SCK @ 500Hz
[03:22:51] <sebus> also slow as hell, but sometimes help if you really messed fusebits
[03:23:09] <cehteh> i am too lame to calculate .. thats one of the rare cases where i just try'n'error
[03:23:36] <cehteh> if errors then moar -B
[03:23:53] <cehteh> if still f*cked .. go to a friend with a HV programmer
[03:24:01] <cehteh> or next chip :D
[03:24:30] <cehteh> and that rarely happened to me .. iirc so far i thrown away 2 tiny13 at most
[03:24:56] <sebus> cehteh http://s7.fmdx.pl/mkavrcalc.png
[03:24:59] <sebus> :>
[03:25:12] <cehteh> yeah but .. i dont really need it
[03:25:14] <sebus> nice front-end
[03:25:21] <sebus> + some nice tools / help
[03:25:34] <cehteh> normally .. if one does things carefully the shit just works
[03:25:37] <sebus> aka designing your own chars for hd44780 and so on
[03:25:54] <sebus> with code generation for upload
[03:26:24] <cehteh> i should try this displays too
[03:26:32] <sebus> cehteh just bought it with price of a programmer
[03:26:34] <cehteh> but i have my font-compiler for cpp :D
[03:26:44] <sebus> about €9?
[03:26:49] <cehteh> http://public.pipapo.org/FontCompiler.h
[03:30:03] <sebus> cehteh http://s7.fmdx.pl/fontgen.png :>
[03:31:31] <cehteh> yeah i like that as source file, makes it easier to version things in git
[03:31:49] <sebus> true that
[03:32:53] <cehteh> one could still make an emacs mode or otherwise graphical frontend to edit character shapes with a mouse
[03:34:09] <Xark> cehteh: You an edit my AVR fonts in an text editor fairly easily. :)
[03:34:15] <rue_house> how about one with the battery starting to split apart and disintegrate
[03:34:27] <cehteh> Xark: yes
[03:34:34] <rue_house> or starting to buldge from too much charge
[03:35:27] * Xark links an example http://hastebin.com/wimixukixi.coffee :)
[03:35:35] <cehteh> 💣
[03:35:53] <cehteh> Xark: see my FontCompiler.h
[03:36:22] <Xark> cehteh: Haha, GMTA. :)
[03:37:55] <cehteh> i'd prefer to stay in C for that
[03:39:58] <Xark> Aren't these all C?
[03:41:10] <cehteh> .coffee?
[03:41:27] <cehteh> oops
[03:41:29] <cehteh> its C
[03:41:36] <rue_house> ohohohoh is there a coffee segment?
[03:42:08] <Xark> cehteh: That is just hastebin adds random colorful extensions. :)
[03:42:14] <cehteh> yeah
[03:42:21] <cehteh> seen
[04:21:39] <cehteh> are there IC's which take digital input (0v, 5V), vcc, gnd, and produce differential output (+/- 10v or so) from that, opamp chargepump etc .. and vice versa differential input to digital output?
[04:22:01] <cehteh> i am sure there are, but dont know where to search and maybe someone has a recommendation
[04:24:48] <Emil> cehteh: what kind of mapping are ypu thinking about?
[04:25:09] <cehteh> mapping?
[04:25:17] <Emil> Serial
[04:25:30] <cehteh> no just generic thinking
[04:26:06] <cehteh> later on i plan about some 'onewire' like bus, with option for differential lines for longer distances
[04:26:09] <Emil> from -128 to127 which give -10 to 10
[04:26:17] <Emil> ?
[04:26:18] <cehteh> eh?
[04:26:55] <cehteh> IC's
[04:27:30] <Emil> What's the end goal?
[04:27:54] <cehteh> as i saied .. having a longer (noise tolerant) wiring
[04:29:28] <Emil> Differential is two wire
[04:29:31] <Emil> anycase
[04:29:43] <cehteh> thats what i saied
[04:30:47] <Emil> any rs-232 chip wouls give you -15 to 15 from a ttl input
[04:30:58] <Emil> and they are designed for it
[04:31:05] <Emil> and they are cheap
[04:31:26] <cehteh> yes like that .. any recommendation for one which includes the -15v generation?
[04:31:33] <cehteh> chargepump or whatever?
[04:31:39] <Emil> most of them do
[04:31:42] <Thrashbarg> RS-422 (IIRC) is differential, so driver chips for that would do what you want
[04:36:21] <cehteh> 485 :)
[04:36:32] <cehteh> well i search later for some IC which does that
[04:49:56] <darkgoogle> If I want to start with a development board how can I upload it to the chip
[04:50:31] <darkgoogle> Do I need something else to upload it?
[04:52:00] <Xark> darkgoogle: If it is a "development board" usually it has a way. Often the AVR will have a serial bootloader e.g., (ala Arduino).
[04:52:39] <Xark> darkgoogle: However, an AVR ISP programmer is a good investment (especially if you want to work with "virgin" chips). Typically $5-$20.
[04:53:10] <darkgoogle> Because I want to use the sam5a chip
[04:53:26] <Xark> Oh....that is not an AVR chip, but an ARM. :)
[04:53:42] <Xark> However, I think it is still similar (but ISP programmer may be more).
[04:53:42] <darkgoogle> Oké :d
[04:55:03] <darkgoogle> But do you know of the chips sam5a got brackets? I can't find it on the atmel site
[04:56:12] <Xark> http://www.atmel.com/microsite/sama5/ ?
[04:59:15] <AndChat|314001> Xark sorry got disconnected
[04:59:35] <Xark> http://www.atmel.com/microsite/sama5/ ?
[05:00:30] <AndChat|314001> Yes
[05:01:04] <AndChat|314001> Because I want to develop with it and use it that's why I need the bracket
[05:02:00] <Xark> I don't know what you mean by "bracket"?
[05:02:06] <Xark> socket?
[05:02:52] <AndChat|314001> Yes sorry socket
[05:03:39] <Xark> AndChat|314001: I think it is only BGA, there is no socket (not for feint of heart) -> BGA196, 289, 256 BGA324 BGA289/361
[05:05:25] <AndChat|314001> Oké because I did see cortex-m3 with sockets
[05:05:50] <Xark> Sam5 is biggest chip from Atmel. Maybe you want SAM3 or similar...
[05:06:58] <Xark> Like http://www.atmel.com/products/microcontrollers/ARM/SAM3S.aspx
[05:07:37] <AndChat|314001> Sam3 I can use to
[05:08:41] <Xark> I think Sam5 is if you need to run Linux etc. :)
[05:10:22] <Darkgoogle> Because I have a big project with sound,2x cams, wifi, temp , and some server stuff so Sam3 can also be used
[05:12:03] <Xark> Well...with networking Linux might be nice...
[05:12:52] <Darkgoogle> But it must be very save
[05:13:28] <Darkgoogle> I did use arduino but it's to small
[05:18:35] <Darkgoogle> But Sam3 do have a socket ?
[05:22:09] <Xark> Darkgoogle: Well, not really. Still surface mount (but fairly easy to hand-solder for up to 144 pins).
[05:23:02] <Darkgoogle> Ow oke but it so small
[05:23:44] <Xark> Darkgoogle: If you are concerned, get Arduino Due (uses SAM3) and just make the add on shield.
[05:25:08] <Darkgoogle> Nah I want to get off the arduino
[05:51:46] <Martin90> what are HAL drivers ?
[06:04:07] <Xark> Presumably Hardware Abstraction Layer (semi-generic term).
[06:04:31] <Xark> Similar in concept to a BIOS.
[08:04:50] <Darkgoogle> If I programmed a sam4 how can I get it on the chip and how can I use the chip do I need to create a board or something
[08:08:28] <cehteh> sam4?
[08:09:00] <Darkgoogle> Cortex
[08:09:05] <cehteh> ah
[08:09:48] <cehteh> the stm32 have a buildin bootloader, dunno about atmel and other vendors
[08:10:01] <cehteh> dfu-util on linux for flashing
[08:10:16] <Darkgoogle> Because I don't understand how to get it on the chip
[08:10:40] <Darkgoogle> Oké because atmega2560 chip is the same
[08:10:41] <cehteh> datasheet ftw
[08:10:48] <cehteh> is it?
[08:10:58] <Darkgoogle> 144 pins
[08:11:02] <Darkgoogle> 100 sorry
[08:11:21] <cehteh> atmega is 8bit avr
[08:11:30] <Darkgoogle> Yes I know
[08:11:40] <Darkgoogle> I mean the same principles
[08:12:03] <cehteh> flashing a program is possibly completely different there
[08:12:16] <cehteh> i dont know the arm cores from atmel
[08:12:17] <Darkgoogle> Yes true
[08:12:37] <Darkgoogle> I think I need to join the atmel channel if it exists
[08:12:40] <cehteh> for the avr cores you can flash them in a lot different ways
[08:12:57] <Darkgoogle> Oké did not know that
[08:13:28] <cehteh> isp over some dedicated pins with reset pulled down, high voltage programming and some moe
[08:13:51] <cehteh> and of course some bootloader which implements your favorite firmware update method
[08:13:58] <cehteh> serial/usb
[08:14:13] <cehteh> almost anything is possible with a bootloader
[08:15:18] <Darkgoogle> Oké because I want to buy a developer board for the cortex chip
[08:15:30] <cehteh> check the datasheets
[08:15:49] <cehteh> atmel has a lot infos available, application notes etc
[08:16:27] <Darkgoogle> Yes but not how to use the chip
[08:16:40] <cehteh> should be somewhere documented too
[08:17:37] <Darkgoogle> That's what I'm looking for to upload a cortex chip and use it
[08:18:37] <cehteh> i would have to google too
[08:18:51] <cehteh> never used a atmel 32bit thingy
[08:19:24] <Darkgoogle> I think that I need 32but because of cam streaming
[08:22:28] <cehteh> likely
[08:22:42] <cehteh> how about raspberry pi or stm32?
[08:22:53] <cehteh> ok no idea what you are going to do
[08:23:07] <Darkgoogle> Because arduino due got a sam3 / sam4 chip
[08:26:13] <cehteh> mhm
[08:52:57] <themba> cehteh: do you remember by issue with the non-working v-usb board this week?
[08:53:35] <cehteh> yes
[08:53:35] <themba> cehteh: the documentation of v-usb states that you can you any bit on port D as D- and D+ as long as D- is also connected to PD0
[08:53:48] <themba> so I used PD1 for D+
[08:54:11] <themba> which turns out to be impossible since it is also TXD :)
[08:54:24] <cehteh> hah
[08:54:43] <cehteh> something like that was my guess .. misconfiguration
[08:55:03] <themba> stupidity from my side but also an error in the documentation of v-usb
[08:56:06] <themba> cehteh: thanks for your help anyway. I have learned so much this week :P
[08:56:49] <cehteh> np
[12:51:46] <Gerritjan> is there no arm channel?
[12:54:19] <Martin90> Gerritjan: what do you mean ?
[12:54:41] <Gerritjan> well i need to know some info about programming
[12:54:49] <Gerritjan> about hardware
[12:55:27] <Martin90> go ahead and ask
[12:55:36] <Tom_itx> there are arm channels though
[12:55:43] <Gerritjan> if a cortex-m3 and cortex m4 is the sameway of programming?
[12:56:05] <Martin90> yes
[12:56:33] <Gerritjan> so if i take a Developerboard Cortex-M4 i can program the M3 to
[12:56:45] <Martin90> no no
[12:57:13] <Martin90> If you have m4 MCU you have to write software for M4
[12:57:27] <Gerritjan> nope
[12:57:29] <Martin90> not any other uC
[12:57:44] <Gerritjan> Sam3x8e
[12:58:49] <Gerritjan> i decided i want to buy a developerboard and make my own cortex board
[12:59:16] <Gerritjan> only i did see that the M3 is 4euro more then the M4 :D
[12:59:55] <Martin90> why do you want to reinvent the wheel ?
[13:02:14] <Gerritjan> i dont but i see that the board cost like 20 euro even more if i make my own 1 its cheaper for to sell to the customers :D
[13:04:41] <Gerritjan> and if i take the Cortex m4 i still can use the arduino Due if i want
[13:05:47] <Gerritjan> and i think if i take a avr8bit it will be to slow for cam streaming
[13:09:21] <Gerritjan> Martin90: thats why
[13:12:29] <Lambda_Aurigae> Gerritjan, depends on the camera, resolution, and frame rate.
[13:13:23] <Gerritjan> 2m
[13:13:27] <Gerritjan> or 1.5
[13:16:33] <Gerritjan> ov2640
[13:20:54] <Lambda_Aurigae> use an rPI-zero
[13:21:06] <Lambda_Aurigae> throw a minimal linux on it, wifi adapter, and camera.
[13:21:36] <Lambda_Aurigae> and camserv software
[13:25:38] <Gerritjan> hmmm dont like linux because its hackable and if i write a cortex self its not i hope :D
[13:25:58] <Lambda_Aurigae> anything is hackable.
[13:26:23] <Lambda_Aurigae> if you can write software for it, I can rewrite software for it.
[13:26:53] <Lambda_Aurigae> people have been known to write bare metal software for the rPI too.
[13:27:00] <Lambda_Aurigae> it's just an arm processor after all.
[13:27:24] <Lambda_Aurigae> but, yeah, an 8bit avr is not going to handle the streaming you want.
[13:27:40] <Lambda_Aurigae> you need something with a bit higher throughput, and likely some dma to handle that throughput.
[13:27:45] <Gerritjan> no i know a picture is also a bit to low
[13:27:56] <Lambda_Aurigae> like an xmega or pic32 even.
[13:28:41] <Lambda_Aurigae> I would do a little research, see just what kind of throughput I needed, the interfaces needed, and test out several different processors before settling on one for a commercial product.
[13:29:02] <Gerritjan> yea and i did look for a mega2560 development board
[13:29:20] <Lambda_Aurigae> mega2560 is still a 20MHz/20Mips chip.
[13:29:31] <Lambda_Aurigae> just 256K of flash.
[13:29:44] <Gerritjan> yes and the M3 got 1m
[13:29:44] <Lambda_Aurigae> to go beyond that 20MHz you have to go with xmega
[13:30:15] <Lambda_Aurigae> it's not all about the flash/ram though..you need to look at processor speed and throughput and how you are going to process that data.
[13:30:47] <Lambda_Aurigae> I've done 640x480 5fps on an atmega1284p
[13:31:15] <Gerritjan> oke i only need a few shots met sec thats it
[13:31:29] <Lambda_Aurigae> fed the data through an nrf 2.4ghz chip to another atmega1284p and displayed it on a small nokia display.
[13:31:32] <Gerritjan> but need quick data handling on a mic
[13:32:32] <Lambda_Aurigae> made some spycams/helmet cams for kids to go along with playing paintball.
[13:32:42] <Gerritjan> cool
[13:33:01] <Lambda_Aurigae> little single eye flipover displays so they could see what their partner sees.
[13:33:09] <Gerritjan> well i need somthing like when a sound goes off i need to take in a millisecond a photo
[13:33:25] <Lambda_Aurigae> each had one transmitter on helm and one receiver on helm...crosslinked to the other partner.
[13:33:30] <Gerritjan> fo a few frames so i can see its true ig a mallfunction is there
[13:33:57] <Lambda_Aurigae> that could be done with an avr easily enough...add in an sd card or serial sram for photo storage.
[13:34:13] <Lambda_Aurigae> what kind of uplink are you looking at?
[13:34:20] <Gerritjan> wifi
[13:34:37] <Lambda_Aurigae> esp2866 module then.
[13:34:42] <Lambda_Aurigae> get the one with lots of i/o
[13:35:00] <Lambda_Aurigae> then you don't even need the external avr as the processor on the esp2866 is more powerful than any avr already.
[13:35:54] <Gerritjan> also temprature and 5v led strip and tcp client and server on it
[13:36:11] <Gerritjan> and some buttonsd
[13:36:32] <Gerritjan> with sdcard :D
[13:48:29] <Gerritjan> Lambda_Aurigae and you can program them with a isp adapter?
[13:52:08] <Gerritjan> Lambda_Aurigae: ATxmega256A3B this 1?
[13:53:17] <Lambda_Aurigae> esp2866 is not programmable with an avr isp programmer.
[13:53:33] <Lambda_Aurigae> atxmega chips are considerably more powerful than the atmega series
[13:53:58] <Lambda_Aurigae> I haven't used them as I skipped that series and went to pic32 myself.
[13:54:12] <Lambda_Aurigae> better to ask questions in channel.
[13:54:18] <Lambda_Aurigae> that way others can learn and/or jump in.
[13:55:31] <Gerritjan> and pic32 can be written with isp programmer?
[13:55:51] <Lambda_Aurigae> not with an avr isp programmer, but a pic icsp programmer.
[13:56:02] <Lambda_Aurigae> I use the pickit3 for pic programming.
[13:56:09] <Lambda_Aurigae> bit more complex than the avr programmers.
[13:56:17] <Gerritjan> oke :D
[13:57:19] <Lambda_Aurigae> I work with a variety of microcontrollers....avr, pic, pic32, 8052, msp430, and the occasional arm(mostly on the rPI)
[13:57:33] <Gerritjan> oke so for the pic32 and atxmega there are adapters for it?
[13:57:39] <Lambda_Aurigae> adapters?
[13:57:50] <Lambda_Aurigae> the pic32 chips I use are 28pin dip package chips.
[13:58:32] <Gerritjan> PIC32MX250F128B-50I/ss ic mcu 32bit 128kb flash?
[13:58:41] <Lambda_Aurigae> that and the next up from that.
[13:58:46] <Lambda_Aurigae> pic32mx270f256b
[13:58:59] <Lambda_Aurigae> 256K flash, 64K sram, 50MHz/83Mips
[14:00:20] <Lambda_Aurigae> nifty chip in that it has DMA, can execute from sram and flash both, and has hardware usb.
[14:01:29] <Gerritjan> oke and i can connect every component on it?
[14:03:05] <Lambda_Aurigae> not sure what you mean by that.
[14:03:47] <Gerritjan> well ov2640 and mic lm393 and temp ds1307 amd rtc module
[14:03:49] <Lambda_Aurigae> pic32 is a very complex chip. more complex than atmega and I suspect more complex than atxmega as well.
[14:04:13] <Lambda_Aurigae> connecting the mic could be problematic but that is the same for any microcontroller.
[14:04:42] <Martin90> Lambda_Aurigae: how would you rate AVR vs STM32 in terms of complexity ?
[14:05:04] <Lambda_Aurigae> stm32 is considerably more complex processor but not sure about the peripherals side.
[14:05:41] <Lambda_Aurigae> I haven't used the stm32 beyond one test board I have here that's been fired up maybe three times.
[14:07:13] <Lambda_Aurigae> stm32 is just a cortex-m processor so it likely has dma and all the funzies that the pic32 has.
[14:09:34] <Lambda_Aurigae> overall the attiny and atmega series are some of the simpler microcontrollers out there.
[14:09:44] <Lambda_Aurigae> I find pic series to be a bit more complex
[14:09:52] <Lambda_Aurigae> pic32 moreso than that.
[14:10:02] <Lambda_Aurigae> 8052 is down around the pic level
[14:11:00] <Lambda_Aurigae> arm chips processor core is comparable to the pic32 overall...then the peripherals vary here and there between them.
[14:22:17] <Lambda_Aurigae> each processor has its place, its strengths, its weaknesses.
[14:44:01] <Martin90> Lambda_Aurigae: I just start with STM32 before I used AVRs MCUs and I get the impression that STM32 is worst documented, would you agree ?
[14:44:44] <Martin90> not to mention that AVR Atmega documentation is 300+ pages long while STM32 is exactly 200 pages
[14:44:47] <Lambda_Aurigae> stm32 is newer and st docs are not the best overall...they are made more for professionals than for new hobby users.
[14:45:13] <Lambda_Aurigae> stm docs are more concise and assume you know and understand things that avr docs don't.
[14:45:54] <Lambda_Aurigae> so, avr docs are easier to understand than stm docs, yes. avr docs are made for beginners where stm docs aren't
[14:48:26] <Martin90> Lambda_Aurigae: I would say that SMT32 docs are not eneough even for professionals...let's take GPIOs as an example, there i literally 7 lines about them !
[14:48:45] <Martin90> how to initialize them - no info
[14:48:50] <Lambda_Aurigae> I haven't read through all the stm docs so can't talk too much on them.
[14:51:24] <Martin90> It doesn't matter, even toolchains are better in AVR...in STM I can't find nice official setup
[14:52:57] <Lambda_Aurigae> on the stm, the datasheet is like the avr summary document.
[14:53:10] <Lambda_Aurigae> there is reference doc for the more advance stuff.
[14:57:51] <Lambda_Aurigae> the reference doc goes into lots of detail, just like the avr datasheet.
[14:58:03] <Lambda_Aurigae> the one I have up is 771 pages.
[14:58:44] <Lambda_Aurigae> 16 pages just on gpio
[14:58:59] <Lambda_Aurigae> but no source examples like avr has.
[15:01:28] <Martin90> Lambda_Aurigae: where did you find that ?
[15:01:35] <Lambda_Aurigae> on the stm website.
[15:01:59] <Martin90> I downloaded one for STM32F446 and it was only 201 pages
[15:02:29] <Lambda_Aurigae> let me see...I just picked one at random.
[15:03:03] <Martin90> ok
[15:03:48] <Lambda_Aurigae> stm32f446mc
[15:03:53] <Lambda_Aurigae> downloading the reference manual now.
[15:04:06] <Lambda_Aurigae> http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN1875/PF260543# on this page.
[15:04:15] <Lambda_Aurigae> 1323 pages
[15:04:46] <Lambda_Aurigae> 18 pages on gpio
[15:04:50] <Lambda_Aurigae> from 173 to 191
[15:04:59] <Lambda_Aurigae> section 7
[15:05:09] <Martin90> ok thank you
[15:05:16] <Martin90> I will check it out
[15:05:23] <Lambda_Aurigae> is about 1/3 the way down the page.
[15:05:32] <Lambda_Aurigae> under the section, Reference Manual
[15:05:42] <Lambda_Aurigae> next section is Programming Manual...you will need that too.
[15:06:02] <Martin90> section in which pdf ?
[15:06:11] <Lambda_Aurigae> on the web page I posted.
[15:06:23] <Lambda_Aurigae> section 7 of the reference manual is gpio.
[15:06:28] <Lambda_Aurigae> http://www.st.com/st-web-ui/static/active/en/resource/technical/document/reference_manual/DM00135183.pdf
[15:06:32] <Lambda_Aurigae> that's the reference manual
[15:06:39] <Lambda_Aurigae> http://www.st.com/st-web-ui/static/active/en/resource/technical/document/programming_manual/DM00046982.pdf
[15:06:45] <Lambda_Aurigae> that's the core programming manual
[15:07:12] <Lambda_Aurigae> the datasheet for stm32 chips is nothing but a summary sheet.
[15:07:48] <Martin90> on that page I see only one pdf
[15:08:03] <Lambda_Aurigae> http://www.st.com/web/catalog/mmc/FM141/SC1169/SS1577/LN1875/PF260543#
[15:08:08] <Lambda_Aurigae> lots of pdf on that page.
[15:08:48] <Lambda_Aurigae> specifications, appnotes, tech notes, reference manual, programming manual, errata, model and cad libs, etc.
[15:09:47] <Martin90> "lots of pdf on that page." huh this fucking website somehow hides it from me o.0
[15:10:04] <Martin90> shows for about a second and then hides
[15:10:13] <Lambda_Aurigae> go to the design resources
[15:10:17] <Lambda_Aurigae> right next to quick view.
[15:10:28] <Lambda_Aurigae> it's a dynamic page,,sorry.
[15:11:13] <Lambda_Aurigae> loads all of the tabs then hides them and shows one tab worth of data at a time.
[15:11:14] <Martin90> ohh I see thanks
[15:11:50] <Lambda_Aurigae> lesson one, how to click on links in a web page to find what you want.
[15:12:20] <Lambda_Aurigae> I charge one large pepperoni pizza per lesson.
[15:13:10] <Lambda_Aurigae> payable if we ever meet face to face in person in the real world.
[15:13:51] <Lambda_Aurigae> I know a guy who charges a whole case of beer for similar work...he has gotten paid twice.
[15:15:33] <Lambda_Aurigae> I just need pizza to go with my movie watching.
[15:15:36] <Lambda_Aurigae> and don't drink beer.
[15:16:49] <Lambda_Aurigae> watching "2001: A Space Odyssey" right now in fact.
[15:17:03] <Lambda_Aurigae> I wanna build a HAL
[15:17:24] <Lambda_Aurigae> I have a soft spot for homocidal computers.
[15:18:34] <Lambda_Aurigae> yes, you can say it. I am a sick twisted individual.
[15:18:47] <Lambda_Aurigae> Skynet is my hero.
[15:26:27] <Martin90> Lambda_Aurigae: hah, yes thanks for lesson one ;)
[15:27:07] <Martin90> Lambda_Aurigae: where are you from ? Just for pizza deal ;P
[15:27:26] <Lambda_Aurigae> I'm from the 7th planet of the Arcturas solar system.
[15:27:44] <Lambda_Aurigae> but I currently reside on Earth, USA, Iowa, just north of Des Moines.
[15:27:48] <Martin90> In this case I wont be able to buy you a pizza sorry ;/
[15:28:18] <Lambda_Aurigae> I don't get to Poland very often.
[15:28:22] <Lambda_Aurigae> like, never so far.
[15:28:23] <Martin90> weel USA is a bit better but still far away ;p
[15:28:29] <Martin90> well*
[15:28:35] <Lambda_Aurigae> I have a friend who used to work there but is now in Germany.
[15:29:16] <Martin90> mhm
[15:29:28] <Martin90> what IDE do you use ?
[15:29:34] <Lambda_Aurigae> I don't.
[15:29:53] <Martin90> so how do you programm your MCUs ?
[15:29:53] <Lambda_Aurigae> I use whatever text editor is handy and command line.
[15:30:17] <Martin90> I would like to program my MCU this way to ...
[15:30:24] <Lambda_Aurigae> too
[15:30:29] <Martin90> yes too ;)
[15:30:56] <Lambda_Aurigae> for the pic and pic32 I do use mplabx sometimes.
[15:31:03] <Lambda_Aurigae> but for avr I do it all manually.
[15:31:29] <Martin90> but I am afraid in this case there is a huge amount of work almost all time since you have to manualy compile headers set toolchains etc
[15:33:26] <Lambda_Aurigae> you do?
[15:33:28] <Lambda_Aurigae> since when?
[15:33:38] <Lambda_Aurigae> I haven't compiled an avr toolchain in 8 years.
[15:33:40] <Martin90> do I do what ?
[15:34:15] <Lambda_Aurigae> and the only pic toolchain I've compiled is for the pic32 to remove an annoying break in the optimization so I didn't have to pay microchip for the license key.
[15:34:51] <Lambda_Aurigae> apt-get install avr-gcc avr-libc binutils-avr
[15:35:02] <Martin90> I am on windows ;)
[15:35:04] <Lambda_Aurigae> add in avrdude and you are ready to rock and roll on debian.
[15:35:22] <Lambda_Aurigae> so install winavr toolchain or the windows compiled toolchain from atmel and away you go.
[15:35:26] <Lambda_Aurigae> no need to compile it.
[15:35:43] <Lambda_Aurigae> hell, if you have atmel studio installed then you have the toolchain there already.
[15:35:58] <Lambda_Aurigae> no need for anything else.
[15:36:03] <Martin90> Lambda_Aurigae, in case of AVRs I have no problems
[15:36:05] <Lambda_Aurigae> except for maybe avrdude to upload.
[15:36:15] <rue_shop3> wait wait
[15:36:30] <Martin90> my problems start when it comes to programm SMT32
[15:36:34] <rue_shop3> microchip puts a liscence lock on the compiler and then issues the source publically?
[15:36:39] <Jartza> evening
[15:36:42] <Lambda_Aurigae> rue_shop3, yup.
[15:36:49] <rue_shop3> hah, stupid and stupid
[15:36:51] <Lambda_Aurigae> source is a version or two behind the current binary.
[15:36:55] <Martin90> Jartza, hey
[15:37:04] <Lambda_Aurigae> for xc32 only.
[15:37:09] <Lambda_Aurigae> maybe xc16 too.
[15:37:15] <Lambda_Aurigae> xc8 is still closed source.
[15:37:19] <Lambda_Aurigae> xc32 is based on gcc though.
[15:37:28] <Lambda_Aurigae> as pic32 is a MIPS core, not a pic core.
[15:37:56] <rue_shop3> I wonder if it comes with the power source sensitivity of a PIC
[15:38:04] <Lambda_Aurigae> rue_shop3, it took me nearly a week of futzing with it to get it to compile correctly.
[15:38:22] <rue_shop3> hmm
[15:38:33] <rue_shop3> most source is only compilable by the author
[15:38:45] <rue_shop3> esp if they have used a bunch of libraries
[15:38:50] <Lambda_Aurigae> rue_shop3, I haven't had problems with power on the pic32mx270f256b chips....only run them at 3.3V though.
[15:38:53] <Lambda_Aurigae> yeah.
[15:39:06] <Lambda_Aurigae> as I said, took me a week to get it to compile correctly.
[15:39:13] <rue_shop3> Lambda_Aurigae, PICs are really sensitive to little power blips
[15:39:15] <Lambda_Aurigae> I found a license server hack though.
[15:39:20] <Lambda_Aurigae> yes, they are.
[15:39:29] <Lambda_Aurigae> pic32 not so much so that I've seen so far.
[15:39:41] <rue_shop3> but not avrs, you can run an avr at 5V, have a 1.8V brownout and it'll not even reset
[15:40:51] <rue_shop3> (with the fuses set anyhow) but I'v seen pics that couldn't take a 4.8V blip from a 5V supply without totally locking up
[15:40:56] <Lambda_Aurigae> yup.
[15:40:57] <Lambda_Aurigae> soon we will see a pvr,,,or avic chip.
[15:40:58] <Martin90> is this channel the only one related to AVR chips ?
[15:41:18] <Lambda_Aurigae> Martin90, #microcontrollers talks about them sometimes too.
[15:41:22] <Lambda_Aurigae> there are others on other networks.
[15:41:28] <Lambda_Aurigae> but this is the main avr channel on freenode.
[15:41:40] <rue_shop3> Martin90, if anyone talks about anthing other than 8 bit avrs, we have someone sent out to kill them
[15:41:50] <Lambda_Aurigae> yeah.
[15:42:02] <Lambda_Aurigae> I've had to fight off assassins for months now.
[15:42:22] <Lambda_Aurigae> good target practice for my armed octocopters.
[15:42:33] <Martin90> rue_shop3: why not 32 bit MCUs ;P ?
[15:42:38] <rue_shop3> yea, we have to use really low grade assasins cause its a free channel and there just aren't he funds for the good ones
[15:43:04] <Jartza> I once mentioned STM32 Cortex M here and I had to change my name and move to Finland
[15:43:05] <Lambda_Aurigae> Martin90, there are 32bit AVR chips as well but they are not real popular.
[15:43:29] <rue_shop3> mainly cause by the time your looking at using them, you might as well go to an ARM
[15:43:34] <Lambda_Aurigae> yup.
[15:43:56] <rue_shop3> but an arm cant do good realtime io control, which is where it needs a slave io controller like an 8 bit avr
[15:44:14] <Jartza> for me, also atmega is obsolete
[15:44:14] <Lambda_Aurigae> they were awesome when they first came out but then arm became popular and avr32 kinda fell by the wayside.
[15:44:31] <rue_shop3> Jartza, what makes it obsolete?
[15:44:36] <Jartza> it's either attiny or xmega and if I need more oomps, then cortex m
[15:44:59] <rue_shop3> you have to understand the application difference
[15:45:03] <Jartza> rue_shop3: xmegas are cheaper and come with more peripherals
[15:45:30] <rue_shop3> on one side you have a MULTITASKING COMPUTER that does calculation and streaming based stuff
[15:45:38] <Lambda_Aurigae> I just wish there were an xmega in a dip package.
[15:45:42] <rue_shop3> on the other side you have a CONTROLLER that does REALTIME TASKS
[15:45:52] <rue_shop3> DEDICATED REALTIME TASKS
[15:46:13] <rue_shop3> if you try to blur that line, your just a NIT
[15:46:38] <rue_shop3> arm cant do realtime io control properly, and an avr cant run an operating system properly
[15:46:42] <rue_shop3> LEARN THE LINE
[15:47:57] <rue_shop3> I must be an arm, I'm currently burning lunch....
[15:48:39] <Lambda_Aurigae> more like a thumb processor.
[15:50:00] <Martin90> Jertza: oomps ?
[15:50:10] <Lambda_Aurigae> Martin90, processing power.
[15:50:17] <Martin90> ahh ok
[15:50:34] <Lambda_Aurigae> also called oompf
[15:50:41] <Lambda_Aurigae> slang
[16:01:50] <Jartza> oomps was actually a typo
[16:02:02] <Lambda_Aurigae> oh...
[16:02:03] <Lambda_Aurigae> oops.
[16:02:13] <Jartza> should've been oompf :)
[16:02:18] <Lambda_Aurigae> aahh
[16:02:21] <Lambda_Aurigae> either way works.
[16:03:28] <Jartza> yea
[16:04:07] <Jartza> I got some breakouts for atxmega32a4u chips I have
[16:04:24] <Jartza> been playing with them for a little and I like them
[16:04:28] <Lambda_Aurigae> someday I'll get an xmega board to play with.
[16:04:43] <Lambda_Aurigae> there is a pic32mz I want to play with first.
[16:04:50] <Jartza> yea
[16:07:05] <Jartza> I'm trying to understand the dma-engine
[16:07:12] <Jartza> it's very versatile
[16:11:09] <Lambda_Aurigae> yeah.
[16:11:23] <Lambda_Aurigae> able to move data from one module to another without processor involvement.
[16:11:58] <Lambda_Aurigae> send an entire line of video data out to the spi port with only a few processor cycles to set it up and initiate.
[16:14:35] <Jartza> that too
[16:14:39] <Xark> Jartza: I take it you have seen this Xmega video demo -> http://www.batsocks.co.uk/readme/XMegaExamples.htm
[16:14:52] <Jartza> though I'm not doing vga currently :)
[16:16:25] <Jartza> Xark: yea, wasn't impressed :D
[16:16:38] <Xark> :)
[16:17:05] <Jartza> which doesn't mean it's not nice
[16:17:20] <Jartza> it very useful still
[16:29:46] <julius> hi
[16:30:33] <julius> anyone here ever did a audio amplification circuit? i need output of about 20w, the input is comming from a usb soundcard. found this online: http://www.ti.com/lit/ds/symlink/lm4732.pdf will that do or should i expect "noise" ?
[16:33:15] <Tom_itx> anybody use PN editor?
[16:33:32] <Tom_itx> i want to add another code scheme to it but i'm not sure how to hook the file to the editor
[16:34:37] <aandrew> I am using an STMicro amp for something very similar
[16:54:05] <jacekowski> julius: there are ready made audio amplifier chips
[16:54:48] <jacekowski> julius: TDA chips
[16:54:52] <jacekowski> julius: made by philips
[16:55:04] <jacekowski> julius: well known tested and proven with shitloads of examples around
[16:55:27] <jacekowski> julius: http://www.electroschematics.com/1192/tda-amplifier-circuits/
[17:03:50] <LeoNerd> I usually use TDA2040
[17:03:52] <LeoNerd> they're nice
[19:07:20] <Dreamer3_> hmmm if i use a struct is C always going to treat it like an array access and page in the things from memory or will it assign them to registers?
[19:07:47] <Dreamer3_> was about to replace a bunch of local variables with a struct
[19:07:55] <Dreamer3_> but if it just turns registers into memory access that would be bad
[19:10:17] <Lambda_Aurigae> never really looked at how gcc handles structs.
[19:26:53] <jacekowski> Dreamer3_: it's complicated
[19:27:10] <Dreamer3_> i'm starting to think it will screw everything up
[19:27:15] <jacekowski> Dreamer3_: x86 gcc structs can be assigned to registers
[19:27:32] <jacekowski> Dreamer3_: but avr gcc is, less than optimal
[19:27:39] <jacekowski> Dreamer3_: so it might end up not working so well
[19:28:06] <Dreamer3_> i want to change a lot of the variables in the struct
[19:28:43] <jacekowski> try it and see what does it generate
[19:28:43] <Dreamer3_> so i bet then gcc will store the registers back to ram
[19:29:35] <ndim> It appears the Atmel documentation on the ATmega1284 fuse bits contradicts the FUSE_* definitions in the avr/iom1284.h Atmel publish (and which are reused in avr-libc).
[19:29:47] <Lambda_Aurigae> remember that you have a limited number of registers available for variable work on an avr.
[19:29:53] <ndim> Am I just being stupid?
[19:30:08] <Lambda_Aurigae> ndim, it's possible.
[19:30:22] <Dreamer3_> Lambda_Aurigae: i know
[19:30:30] <Dreamer3_> familiar with register pressure
[19:30:44] <Dreamer3_> but local variables as registers is pretty common if there is space
[19:30:54] <Lambda_Aurigae> yes.
[19:30:56] <Dreamer3_> i just dunno if using a struct will totally bork that
[19:31:04] <Dreamer3_> 6 variables vs 6 in a struct
[19:31:13] <Lambda_Aurigae> a struct is a special case that kinda horks hairballs on limited systems like avr.
[19:31:15] <Dreamer3_> a struct that i have a reference to
[19:32:08] <Dreamer3_> trying ti find a way to split a huge sprite draw function with 5 variants but preserve the top half of the setup which is shared
[19:32:19] <Dreamer3_> was thinking of a context struct
[19:34:12] <Dreamer3_> i could just copy everything inro variables again
[19:34:36] <Dreamer3_> might come down to speed vs size
[19:38:52] <Dreamer3_> although that's not really worse than the push/pop madness since they are all variables right now
[19:43:50] <Xark> Dreamer3_: In general for AVR, a struct is not going to be quite as optimal as several locals (in most cases). E.g., C is required to write the struct members back to memory before every function call, whereas a local (in a saved register) can stay in a register over a call.
[19:44:11] <Dreamer3_> so as i thought :)
[19:44:17] <Dreamer3_> i'd want to page them into registers myself
[19:45:07] <Xark> Dreamer3_: Probably want asm then...however are you sure you can save significant vs compiler? Usually it is constrained by "the rules" (that you tend to need to follow too). :)
[19:45:28] <Dreamer3_> nah i think i just want to copy them back into variables
[19:45:31] <Dreamer3_> for local use
[19:45:42] <Xark> Sounds good.
[19:45:53] <Dreamer3_> the the question becomes how expensive the call/return is and passing the struct around by reference
[19:46:26] <Xark> Well AVR typically passes an arg or two in registers so fairly efficient.
[19:47:16] <Xark> Often globals can be a win on AVR.
[19:47:34] <Dreamer3_> right now it's all in one big function but i'm considering three functions
[19:48:07] <Dreamer3_> hmmm globals for the render context
[19:48:22] <Xark> E.g., if you always called plot(x, y) with (xpos, ypos), then perhaps just plot() and load xpos and ypos globals directly (depending).
[19:48:47] <Xark> As long as there can only be one context, probably a good efficiency call.
[19:48:55] <Xark> (or one current context)
[19:49:30] <Xark> Also, if you have a global struct (context.xpos; context.ypos etc.) those access are exactly the same as a bunch of individual globals (so can look pretty tidy).
[19:50:21] <Xark> (and you never "pass" anything, fairly cheap for code to load what it needs from context)
[19:50:42] <Dreamer3_> well global struct is going to have the same struct issues
[19:50:47] <Xark> (if you define it first, you may even save due to 8-bit memory addresses)
[19:50:49] <Dreamer3_> just prevent passing the 2 byte struct pointer around, no?
[19:51:22] <Xark> Dreamer3_: A global struct is no different than globals of all its members (2 or 3 cycle load - pretty cheap).
[19:51:33] <Dreamer3_> right i need 0 cycles
[19:51:55] <Dreamer3_> are you saying a global struct is different than local?
[19:52:02] <Xark> Yes!
[19:52:13] <Dreamer3_> why?
[19:52:25] <Xark> Stack relative address is painful on AVR, a global is just a absolute address.
[19:52:52] <Dreamer3_> oh because for local the offset can't be encoded in the program code, it also has to be kept track of?
[19:53:13] <Xark> I.e., load r0,0x100 vs add 7 to stack, put in pointer registers, then dereference that pointer
[19:53:51] <Xark> AVR tends to keep stack in Y (IIRC), so not always that painful, but always slower than global
[19:54:16] <Xark> Also ptr->member is same deal (with ptr vs stack)
[19:54:30] <Dreamer3_> yeah you're persuading me to use a global :)
[19:54:54] <Xark> Seems reasonable in this context.
[19:55:10] <Xark> (again, only one rendering context - so might as well be global)
[19:57:03] <Xark> Dreamer3_: This was one of the optimizations I did in my LCD stuff (make sure the global LCD context was a global struct). -> https://github.com/XarkLabs/PDQ_GFX_Libs/blob/master/PDQ_ILI9341/examples/PDQ_graphicstest/PDQ_graphicstest.ino#L26
[19:57:26] <Dreamer3_> oh
[19:57:29] <Dreamer3_> ecept now they eat ram all the time
[19:57:48] <Xark> Ram/stack, pretty much same diff.
[19:58:03] <Dreamer3_> ah, i see
[19:58:22] <Dreamer3_> you need the ram available at least toe ven call the function to do on the stack allocation :)
[19:58:24] <Xark> Grows up vs grows down (and a problem if they meet in the middle). :)
[19:59:22] <Dreamer3_> right
[19:59:28] <Dreamer3_> stack coming down from top
[20:00:26] <Xark> It is not like the stack "frees" anything, however, it can "reuse" areas (in functions that aren't nested together). Similar to using a union on globals (so size is worst case of overlapping objects).
[20:03:16] <Dreamer3_> well when a function returns the memory is freed
[20:03:19] <Dreamer3_> until it's needed again
[20:03:41] <Dreamer3_> but i see how you can quickly get to same diff
[20:03:48] <Xark> Not really freed, but it can be reused...
[20:04:02] <Xark> (worst case is what matters)
[20:04:06] <Dreamer3_> well it's freed when a feunction returns and the stack goes back up
[20:04:24] <julius> jacekowski, thank you
[20:04:25] <Dreamer3_> i dunno what else "freed" would maen in the context of stack
[20:05:02] <julius> LeoNerd, thd is 0.5% for those things. does that mean its over the full output range? can i crank it up to 25w and expect a "clear" signal?
[20:05:08] <Xark> Dreamer3_: Okay, but memory can't really be used for much (except reused for stack). So depends what you mean by "free" (it still comes out of available ram)
[20:05:48] <Dreamer3_> well you can have dynamic allocation if you want :)
[20:06:33] <julius> LeoNerd, or would you go for a chip with a higher output wattage if your boxes can handle 25w? meaning a chip that can do 40 or more watt so the output is still perfect at 25w
[20:06:46] <Dreamer3_> but if you are super tight you could have two functions with huge memory usage if you use the stack, but that wouldn't work with globals
[20:06:47] <Xark> Okay, but "realistically" you are not going to re-use the stack memory as anything but stack (not that it is impossible...but). :)
[20:06:48] <Dreamer3_> since you wouldn't have the ram
[20:06:51] <Dreamer3_> so it's all trade offs
[20:07:24] <Dreamer3_> well it's just the more globals the less RAM so when you're building a library it gives your library users fewer choices
[20:07:31] <Xark> Dreamer3_: As I mentioned, same as using a "union" to overlap the globals used by the two functions.
[20:07:39] <Dreamer3_> you always need enouch stack for max function call depth
[20:07:56] <Dreamer3_> yeah i have pre and render was thinking of a union
[20:08:01] <Dreamer3_> but the variable dependence is tricky
[20:08:05] <Dreamer3_> have to be careful about the overla
[20:08:22] <Xark> Yeah. Locals "smack you" if you get that wrong. :)
[20:08:41] <Xark> (can't get there from here...)
[20:09:46] <Xark> But in theory, anything that could have been locals in the two non-nested functions can be overlapped in a union (for pretty much same memory effect)
[20:09:47] <Dreamer3_> https://gist.github.com/yyyc514/e2cd91a89da39f9ee0c6
[20:10:54] <Xark> (well, except that locals can live in regs often...) :)
[20:11:47] <Xark> Anyways, global context makes sense. If you are scrapping for RAM, then using a union might allow you to re-purpose some struct members (but I would get it all working first). :)
[20:11:54] <Dreamer3_> right but i'm not using asm... so i have to read the preRC and calculate the RC without overwriting any of the neded preRC varialbles
[20:12:15] <Dreamer3_> just have to make sure i don't overwrite a variable in the union before i'm done using it
[20:12:47] <Xark> Yes, obviously if you need both values, then they cannot overlap (e.g., the first N elements can be the same in both union members).
[20:13:56] <Xark> The union thing is pretty hacky (as I mention), but using a global here is likely a big speed and code size win.
[20:14:17] <Dreamer3_> only hacky because i really want co-use, otherwise it just sounds frugal :)
[20:14:30] <lorenzo> http://www.atmel.com/webdoc/AVRLibcReferenceManual/group__avr__stdlib_1ga060c998e77fb5fc0d3168b3ce8771d42.html
[20:14:34] <lorenzo> what's width exactly? :/
[20:15:30] <Lambda_Aurigae> minimum field width of the string.
[20:15:34] <Lambda_Aurigae> just as it says in the text.
[20:16:04] <lorenzo> "field" width?
[20:16:10] <lorenzo> as in, minimum length of the string?
[20:16:16] <Lambda_Aurigae> yes.
[20:16:24] <lorenzo> so I guess it's 3 for 0.0 which is the minimum value. meh
[20:16:25] <lorenzo> thanks
[20:16:28] <Lambda_Aurigae> including the . and the - if it is negative.
[20:16:43] <Lambda_Aurigae> just like it says.
[20:17:02] <lorenzo> yeah, I wonder why it needs to know that
[20:17:06] <lorenzo> time to check that code
[20:17:19] <Dreamer3_> Xark: pointer in going to be 2 bytes in a struct, yes?
[20:18:34] <Lambda_Aurigae> lorenzo, note, minimum length..the string can be more than that but that's the minimum...so it will pad out with blanks most likely.
[20:18:35] <Xark> RAM pointer is always 2 bytes (but often a global can land in < 0x100 memory and only take one byte ti address)
[20:21:23] <Dreamer3_> but a pointer in a struct is going to be 2 bytes
[20:21:57] <Dreamer3_> cause struct have a fixed size i thought
[20:24:32] <Xark> "pointer to something in RAM is always 2 bytes"
[20:24:42] <lorenzo> http://hastebin.com/raxapagebe.avrasm
[20:24:50] <lorenzo> wonder if there's a better way to prepend two characters to a string
[20:25:35] <Lambda_Aurigae> depends on whether you have sprintf capability linked in.
[20:25:51] <lorenzo> yes, I have sprintf (without %f)
[20:26:04] <lorenzo> so I could just sprintf(where, "T:%s", what);
[20:26:17] <Lambda_Aurigae> works for me.
[20:26:44] <Lambda_Aurigae> might even be able to use the same variable both ends but not sure...would have to try it.
[21:42:20] <Xark> memmove() the string to make room for new first two chars, poke them in, done. :)
[21:50:55] <cehteh> mhm
[22:49:08] <Dreamer3_> um ok
[22:49:13] <Dreamer3_> i didn't know about this alignment packing stuff
[22:49:15] <Dreamer3_> http://www.catb.org/esr/structure-packing/
[22:49:19] <Dreamer3_> is this still a thing?
[22:49:36] <Dreamer3_> going to totally change my understanding of unions
[22:52:50] <Dreamer3_> looks like no
[22:52:52] <Dreamer3_> cause we're 8 bit?
[23:01:21] <cehteh> yeah no need to worry
[23:02:08] <cehteh> otherwise you can always __attribute__(packed)
[23:02:17] <cehteh> (in gcc)