#avr | Logs for 2015-09-12

Back
[01:54:32] <gorroth> Darkwell: you can use the RPi's GPIO pins to program an attiny directly, if 3.3v is okay for you
[01:55:58] <gorroth> Darkwell: if not, then you could use an RPi's GPIO pins through a voltage level translator, and then you don't have to do anything other than by an IC/board that costs like 2 bucks, iirc
[01:59:36] <gorroth> s/by/buy/
[06:01:39] <twnqx> what's the difference between an ATmega3250A and an ATMega3250PA? data sheets don't tell much...
[06:05:15] <twnqx> ok... in the device selector, the A is listed as "pico power: no"
[06:51:16] <sinclair> hi everyone
[06:53:49] <sinclair> anyone alive?
[07:06:11] <sinclair> uhm anyone know where ADFR is defined?
[07:13:21] <Lambda_Aurigae> sinclair, in the header files...just a min and I'll look.
[07:14:53] <Lambda_Aurigae> in the iotnXX.h or iom.XX file for the specific chip.
[07:15:17] <Lambda_Aurigae> /usr/lib/avr/include/avr/iom8.h for me for the atmega8
[07:28:30] <sinclair> ah ok, thank you very much
[07:29:09] <Lambda_Aurigae> grep is the mostest awesomeist tool ever.
[07:29:57] <Lambda_Aurigae> in fact, it is line 561 in iom8.h
[07:30:34] <sinclair> well i got an 324p, funny thing is the intellisense guided me to your path above but i still can't get it to compile :|
[07:30:53] <Lambda_Aurigae> do you include avr/io.h in your source?
[07:31:06] <Lambda_Aurigae> and define your processor before that,,,usually done in the makefile..
[07:31:35] <Lambda_Aurigae> you don't include that file directly...io.h does it..
[07:31:36] <sinclair> yeah i did, i'm using avr studio though,
[07:31:42] <sinclair> ah ok
[07:31:56] <Lambda_Aurigae> oh..no clue on avrstudio though.
[07:32:08] <Lambda_Aurigae> don't use it here.
[09:40:34] <sinclair> anyone know how to use snprintf() to print a double, i get question mark instead of the double value when using "Temp: %f" :(
[09:56:53] <twnqx> yes.
[09:58:00] <twnqx> in your Makefile (assuming you use the standard one)
[09:58:08] <twnqx> search fpr PRINTF_LIB
[09:58:29] <twnqx> and change that from PRINTF_LIB_MIN to PRINTF_LIB_FLOAT
[09:58:51] <twnqx> or from empty to $(PRINTF_LIB_FLOAT)
[09:58:58] <twnqx> @ sinclair
[12:42:33] <kobboi> anyone compiled qsimavr lately?
[12:43:47] <Lambda_Aurigae> never heard of it.
[12:47:10] <kobboi> https://github.com/schuay/qsimavr and https://github.com/schuay/simavr
[12:48:44] <Lambda_Aurigae> I know about simavr
[12:48:49] <Lambda_Aurigae> just had never heard of qsimavr
[12:49:23] <Lambda_Aurigae> so, no, haven't compiled it lately...or ever.
[12:49:24] <kobboi> i wanted to take a look at simavr and since qsimavr sounds GUI, i thought i'd start with that
[12:50:16] <Lambda_Aurigae> haven't bothered with simulators...tried them before and found them rather flat and unamusing.
[12:50:19] <Lambda_Aurigae> and I need amusing.
[12:50:26] <Lambda_Aurigae> so I stick with real hardware.
[13:04:17] <kobboi> i need some learning first, so I'm ... intrigued .. by simulators
[13:11:41] <Lambda_Aurigae> nothing you can learn on a simulator that you can't learn on the real thing.
[13:12:19] <Tom_itx> except that they don't sim everything
[13:12:23] <Lambda_Aurigae> I believe in reading the datasheet cover to cover first before touching anything.
[13:12:31] <Lambda_Aurigae> yeah..there are some things you can't learn on a sim.
[13:16:00] <Jartza> Lambda_Aurigae: http://gerblook.org/pcb/CzS7nNxAxHmQVvZpnMeGp4
[13:16:01] <Jartza> :D
[13:16:11] <Jartza> silkscreen still a mess
[13:16:21] <Lambda_Aurigae> looks like ardweeny!
[13:16:25] <Lambda_Aurigae> hehe.
[13:21:48] <sinclair> hmm, i'm trying to get readings from a TMP36 but ADCH returns low values like 28, 31 etc on pin 40 (ATmega324p) anyone have any clues on what i might be doing wrong?
[13:23:51] <twnqx> Lambda_Aurigae: i prefer reverse engineering in emulators :D
[13:24:08] <Lambda_Aurigae> ok.
[13:24:18] <twnqx> i tend to write my own ones for that, though
[13:32:42] <Jartza> Lambda_Aurigae: yea, it's vga shield ;)
[13:33:09] <Jartza> I've been calling it TinyVag :D
[13:33:19] <Jartza> "oops, I misspelled VGA"
[13:34:33] <Jartza> and because tinyvga exists
[13:36:50] * Xark found the Atmel studio sim quite useful debugging and optimizing his AVR 6502 emulator (didn't need to interact with HW). Usually less useful...
[15:22:41] <rue_house> sinclair, what?
[15:37:01] <sinclair> don't really know how to get a valid reading or if i should use ADCH or ADCW when reading values from the TMP36
[16:05:26] <Casper> sinclair: why not just read "ADC" ?
[16:05:58] <Casper> which is a 16 bits
[16:09:43] <gorroth> just tested my PWM code with the motors today, and it was acting weird. looked more into what the motor controller was expecting, and i realized i just had my period set incorrectly. i thought it was 3ms, but servo signals are actually 20ms (50 Hz)
[16:09:51] <gorroth> i fixed that, and everything is working as i expected now :-)
[16:10:17] <gorroth> however, the timer on my MCU is a little off; so, i'm thinking of picking up an oscillator at the local microcenter, if they have one
[16:10:21] <gorroth> just so i can get a good signal going
[16:11:05] <sinclair> Casper: ok i tried that and got 6547 back, does it seem reasonable?
[16:11:50] <Casper> nope
[16:11:58] <Casper> 0-1023
[16:14:52] <sinclair> crap
[16:15:07] <sinclair> Casper: could you give my code a quick glance?
[16:15:21] <Casper> too tired
[16:15:58] <sinclair> ok
[16:16:01] <sinclair> thanks anyway
[18:44:34] <Jartza> well
[19:30:57] <Lambda_Aurigae> Jartza, deep hole containing water, oil, gas, or sometimes christians or small children.
[19:36:43] <Jartza> :)
[19:36:50] <Jartza> http://gerblook.org/pcb/zUCJQFCuiMg523k7MUre6W
[20:00:43] <Jartza> well. ordered few of those boards anyway to see if they work
[20:00:49] <Jartza> of course, they can be used without arduino too