#avr | Logs for 2013-03-09

Back
[04:09:17] <jonny_> hi,
[04:09:39] <jonny_> is there a german language avr assembler channel?
[04:12:25] <RikusW> not that I know of
[04:12:30] <RikusW> but I do know avr asm
[04:12:42] <RikusW> so what do you want to know ?
[04:12:46] <jonny_> ok. i will try it in english
[04:12:48] <jonny_> :)
[04:13:30] <jonny_> i have an atmega32 with 30 software pwm
[04:13:36] <jonny_> that works fine
[04:14:07] <jonny_> hardware, software, live usage.
[04:14:30] <jonny_> now i want to change the pwm to a bcm
[04:14:44] <jonny_> so i have another sample code
[04:15:00] <jonny_> that works fine - sometimes...
[04:15:06] <RikusW> bcm ?
[04:16:03] <jonny_> binary coded modulation
[04:16:07] <RikusW> ah
[04:16:17] <RikusW> http://sites.google.com/site/megau2s/home/jtag
[04:16:32] <jonny_> thats not the problem
[04:16:42] <RikusW> A free Jtag ice mki debugger for m32
[04:17:09] <jonny_> my problem iss rather strange
[04:17:15] <jonny_> let me explain
[04:17:29] <RikusW> sometimes works and sometimes not ?
[04:17:31] <jonny_> sometimes the routine works fine
[04:18:06] <jonny_> after a few hardware resets, sometimes at power on, all i/o ports switch to full on
[04:18:38] <RikusW> sounds odd
[04:18:58] <jonny_> if the program starts ok, it will function ok until power cycle, or hw reset
[04:19:19] <jonny_> i tried without heavy load
[04:19:30] <jonny_> to exclude power drops
[04:19:40] <RikusW> you might be forgetting to initialize some variable
[04:19:53] <jonny_> and i added a tantal cap, to filte hf drops
[04:20:11] <jonny_> so the hardware part is nearly to exclude
[04:20:37] <jonny_> yes
[04:21:00] <jonny_> it seems to be an initialisation issue
[04:21:23] <jonny_> but i do know nearly nothing of avr asm :(
[04:21:53] <RikusW> did you read the instruction set pdf ?
[04:22:07] <jonny_> yes
[04:23:19] <RikusW> paste your code somewhere ? how many lines is it ?
[04:23:23] <jonny_> the sampe code runs fine at the autors side. (supposedly
[04:23:39] <jonny_> thats not so much.
[04:24:33] <jonny_> i can cut off the replications of the 30 ports and just leave one of them
[04:25:38] <RikusW> maybe just paste as is
[04:25:41] <RikusW> pastebin.com
[04:25:54] <jonny_> ok. 5 mins.
[04:26:22] <jonny_> i have to serach a working version witout my useless trials :)
[04:41:08] <jonny_> re
[04:45:20] <abcminiuser> Wooo, my Mass Storage class bootloader works
[04:49:44] <RifRaf> is arduino code c or c++ ?
[04:49:49] <abcminiuser> C++
[04:49:50] <OndraSter__> abcminiuser, so you drop a hex file onto virtual AVR flash drive?
[04:49:58] <abcminiuser> Jupp
[04:50:02] <abcminiuser> And it reprograms itself
[04:50:06] <OndraSter__> yay nice
[04:50:24] <RifRaf> abcminiuser i am trying to convert some code from arduino and getting this compile error alot, like for every function
[04:50:38] <Roklobsta> abc: where is th RF group in atmel located? .no?
[04:50:42] <abcminiuser> OndraSter__, https://github.com/abcminiuser/lufa/tree/master/Bootloaders/Incomplete/MassStorage - needs more testing and cleanup
[04:50:45] <RifRaf> colorimeter.cpp:50: error: 'RGBtoHSV' was not declared in this scope
[04:50:51] <RifRaf> for all my functions
[04:51:02] <RifRaf> am still using c++
[04:51:19] <abcminiuser> RifRaf, Arudino does some strange preprocessing on files, to auto-add declarations and such so it could be that
[04:51:33] <abcminiuser> Roklobsta, Colarado Springs I think
[04:51:41] <abcminiuser> I'm not in the wireless BU, so not sure
[05:01:30] <Roklobsta> is the reason for avr maxing out at 20MHz because of the slow flash rom?
[05:02:05] <OndraSter__> no idea
[05:02:11] <OndraSter__> megas can run on 24MHz just fine
[05:02:13] <OndraSter__> some megas.
[05:02:19] <OndraSter__> the ones with smaller (64kB) flashes
[05:03:03] <Roklobsta> i did work on an silabs 8051 that did 100MHz bu it had a code cache to minimise flash rom stalls.
[05:03:07] <OndraSter__> but hey, xmega can run at 32MHz stock
[05:03:16] <OndraSter__> I ran the core (+ flash + GPIO) on 80MHz :)
[05:04:13] <OndraSter__> Roklobsta, doesn't 8051 have like two cycles per instruction?
[05:04:15] <OndraSter__> or more?
[05:04:54] <Roklobsta> yeah some 4+ depends on who makes the core though. silabs is a quick one
[05:08:50] <Steffanx> OndraSter__ and his xmega fetish :P
[05:08:55] <OndraSter__> yep
[07:34:11] <OndraSter__> abc
[07:34:12] <OndraSter__> he is gone again
[07:34:48] <theBear> *POOF*
[07:34:52] <theBear> just like that
[07:35:06] <OndraSter__> :P
[07:35:10] <OndraSter__> * abcminiuser odešel (Ping timeout: 250 seconds)
[07:35:11] <OndraSter__> just like that
[07:35:43] <theBear> odelay indeed
[07:35:54] <OndraSter__> heh
[07:35:58] <OndraSter__> I forgot I have got xchat in czech
[07:39:41] <RikusW> theBear: heard of the perfect mosfet driver ? -> The PVI: A Versatile Circuit Element http://www.irf.com/technical-info/appnotes/an-1017.pdf
[07:40:56] <theBear> hmm, fancy optocoupler eh
[07:41:40] <theBear> looks kinda handy, don't like the way only one person makes it tho
[07:42:04] <RikusW> will work nicely for high side mosfets
[07:42:11] <theBear> indeed
[07:42:33] <RikusW> seems they specify max 200us turn on...
[07:42:42] <theBear> that sounds fastish
[07:42:47] <RikusW> depending on gate capacitance
[07:43:09] <RikusW> not fast enough for 500kHz smps...
[07:43:57] <RikusW> will barely work for 5kHz
[07:45:01] <RikusW> Figure 9. An AC/DC Power Supply nice idea :)
[07:50:33] <RikusW> part nr: PVI1050N
[08:11:03] <dahj> DDRC = 0xFF; PORTC = 0xFF; while(1){} outputs ~4.3 V, doesn't it suppose to output 1.8 V?
[08:11:39] <RikusW> at what current ?
[08:11:51] <RikusW> and what is Vcc ?
[08:12:35] <dahj> I get Vcc from avr dragon I read as 4.6 V
[08:12:44] <dahj> I will measure the current now
[08:12:50] <theBear> so why would it output 1.8v then ?
[08:13:42] <theBear> and vcc shouldn't be 4.6, that's a silly vcc
[08:17:24] <dahj> current is around 27 mA
[08:17:35] <dahj> what should be the Vcc?
[08:18:21] <theBear> generally 5 and 3.3 are popular numbers...
[08:18:36] <theBear> but ignoring that, why woudl you expect 1.8v ?
[08:19:24] <RikusW> dahj: I think AVR io pins are rated for 20mA
[08:19:32] <theBear> yeah, that too
[08:19:41] <dahj> I remember that I measured 1.8V before, it is also an expected mcu signal output, no?
[08:19:48] <theBear> no, no it isn't
[08:19:50] <theBear> high or low
[08:19:57] <theBear> roughly 0 or vcc
[08:20:20] <theBear> and if yer overloading pins, until you blowup the avr, you will see all kinds of unusually low voltages
[08:22:55] <RikusW> I once connected 12V to the wrong side of the regulator an blew a m48... :(
[08:23:16] <RikusW> stupid non std regulator pinouts
[08:23:20] <dahj> ok, I was measuring wrong, voltage between Vcc and gnd pin is 5 V, but V between port C and gnd is 4.35 V, is it still not good?
[08:23:48] <dahj> or is it normal output for the logic high?
[08:23:57] <RikusW> I'd expecit it to be a bit higher
[08:24:24] <theBear> but you shouldn't be pulling 27ma, and from memory no more than 200mA for the whole chip
[08:24:52] <RikusW> seems the ds specifies it as min 4.2V at 20mA
[08:25:50] <RikusW> dahj: what is that pin connected to ? (apart from the meter)
[08:26:12] <RikusW> disconnect it and measure again
[08:27:05] <RikusW> theBear: abs max per pin is 40mA
[08:27:17] <RikusW> and 200mA for Vcc/Gnd
[08:27:35] <theBear> it is ? hmmm
[08:28:07] <dahj> a led and a resistor is connected while I was measuring. I will disconnect them
[08:28:31] <RikusW> recommended would be 20mA
[08:28:44] <RikusW> value of resistor ?
[08:30:03] <dahj> now I read close to 2 mA
[08:30:23] <RikusW> V ?
[08:30:49] <dahj> 4.35 V
[08:31:26] <RikusW> its within the specs..
[08:31:31] <dahj> is it possible to lower the logic high signal by changing fuse settings?
[08:31:37] <RikusW> no
[08:32:19] <dahj> ok, thanks for the help
[08:35:28] <RikusW> I just checked a m32u2, on high with no current drawn it measures high as vcc
[08:35:51] <RikusW> so 5v06 and with only the pullup enabled 5v00
[08:36:01] <RikusW> my Vcc = 5v06
[08:36:48] <dahj> could it be something wrong with my mcu?
[08:38:28] <RikusW> what kind of meter are you using ? high impedance ?
[08:40:11] <RikusW> on a pin thats not connected to anything Vih = Vcc
[08:44:05] <dahj> RikusW, I use a digital multimeter, but I don't know its impedance. I also measure the voltage on a digital oscilloscope it also shows 4.32 V
[08:44:31] <dahj> and there is no load
[08:45:22] <dahj> I have one more mcu, I will connect it then measure the V
[08:52:12] <dahj> I read the same voltage, 4.32V, between port C and GND pin. I don't know if something wrong with it
[08:53:10] <Tom_itx> 'it'?
[08:53:12] <Tom_itx> you meter?
[08:53:28] <Tom_itx> your µC?
[08:53:45] <Tom_itx> your regulator?
[08:53:55] <dahj> one of them :)
[08:54:24] <dahj> I use two meter to measure, they measure the same voltage
[08:54:42] <Tom_itx> they both must be bad then
[08:54:44] <Tom_itx> :D
[08:54:54] <dahj> could be :)
[08:54:54] <theBear> heh
[08:55:21] <Tom_itx> find one that measures what you want and keep it
[08:56:58] <RikusW> dahj: which AVR do you have ?
[08:58:58] <dahj> 168a and I refer http://www.atmel.no/webdoc/avrdragon/avrdragon.SCKT3200A2.html for the connection between avr dragon and 168a
[08:59:09] <Tom_itx> Output High Voltage 4.2
[08:59:12] <Tom_itx> data sheet
[08:59:21] <Tom_itx> minimum
[08:59:49] <Tom_itx> P.303
[09:00:15] <dahj> then all is fine, right?
[09:00:21] <RikusW> dahj: are you connecting using HVPP ?
[09:00:27] <dahj> no ISP
[09:00:32] <RikusW> ok
[09:00:37] <dahj> I refer figure 12
[09:03:49] <RikusW> dahj: do you have AVcc connected to Vcc ?
[09:05:26] <dahj> RikusW, no it is not connected. do I need to connect them?
[09:05:46] <RikusW> yes
[09:06:06] <RikusW> then check pin io V again
[09:09:17] <dahj> 4.412V now
[09:09:34] <dahj> it used to be 4.35V
[09:10:10] <Tom_itx> always connect avcc
[09:10:31] <Tom_itx> and ALL vcc & gnd
[09:11:24] <dahj> I was referring the pin connections on http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/mega168_led_sch.png
[09:12:04] <Tom_itx> i failed to add it there
[09:14:13] <swart> nothing like a bad usb cable to make me question my sanity
[09:14:32] <RikusW> ugh..
[09:16:04] <Tom_itx> i should fix that i suppose
[09:24:11] <Tom_itx> fixed
[09:27:23] <kdehl> God, I'm frustrated. I'm trying to make an LCD work. But now matter what I try... nothing happens.
[09:27:47] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/LCD/
[09:27:52] <kdehl> I wish I could get debug error messages, like when coding java!
[09:28:08] <Tom_itx> uses 4 bit mode
[09:28:19] <kdehl> Yeah. Dunno if that's simpler though.
[09:28:20] <Tom_itx> D4..7, RS, RW, E
[09:28:24] <Tom_itx> it is
[09:28:28] <kdehl> I'm following this one;
[09:28:30] <kdehl> http://newbiehack.com/MicrocontrollersABeginnersGuideOurFirstLCDProgram.aspx
[09:28:42] <Tom_itx> you can set your pinout in the .h file
[09:28:47] <kdehl> Oh.
[09:28:49] <kdehl> cool.
[09:29:39] <Tom_itx> that's for a 4 line
[09:30:27] <RikusW> kdehl: why not printf out of a serial port ?
[09:30:44] <Tom_itx> where's the fun in that?
[09:30:55] <kdehl> Actually, you can set the number of lines of the display in the header file as well.
[09:31:16] <Tom_itx> yes
[09:31:18] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/mega128/lcdtest/
[09:31:22] <Tom_itx> there's one for a 2 line
[09:31:32] <Tom_itx> same basic code
[09:31:57] <kdehl> Yeah.
[09:32:07] <Tom_itx> change to the chip you have of course and the clock speed
[09:32:37] <kdehl> Thanks, but... it all seems so complicated. The ony I follow has really little code that seems to be simple. I've probably just made a small mistake somewhere...
[09:33:05] <Tom_itx> what's your pinout?
[09:33:38] <Tom_itx> and how many row col?
[09:34:25] <kdehl> I can paste the code...
[09:34:34] <Tom_itx> what chip and clock speed is it?
[09:35:33] <kdehl> http://pastebin.com/nSmPGh9D
[09:36:06] <kdehl> The display is a JHD162A.
[09:36:23] <Tom_itx> HD44780 compatible?
[09:36:45] <kdehl> http://www.egochina.net.cn/eBay/Download/JHD162A.pdf
[09:36:51] <kdehl> No idea what that is.
[09:37:43] <kdehl> Ah, that's the one he uses in the tutorial.
[09:37:59] <kdehl> Yeah, the pins are the same, and the commands are the same as well, as far as I can see.
[09:39:52] <Tom_itx> what avr is it?
[09:39:56] <Tom_itx> what clock speed?
[09:40:45] <swart> wow that was interesting. just crashed my mac hard
[09:41:06] <swart> pressed the reset button on the uc while avrdude was trying to connect
[09:41:20] <kdehl> It's a atmega1284p, using internal clock.
[09:41:24] <kdehl> *an
[09:41:30] <Tom_itx> 1mhz?
[09:41:33] <Tom_itx> 8mhz?
[09:42:06] <kdehl> Whatever the default setting is, I dunno...
[09:42:10] <Tom_itx> 1
[09:42:28] <kdehl> Ah. Okay.
[09:43:20] <kdehl> You're right, it might be something with the delays...
[09:43:59] * kdehl adds more delay
[09:44:13] <Tom_itx> are you using byte or nibble mode?
[09:44:40] <kdehl> Byte.
[09:45:06] <kdehl> Is it really reasonable that it takes 36 seconds to upload 7066 bytes to it when I program it?
[09:45:21] <Tom_itx> no
[09:45:42] <Tom_itx> maybe with a slow programmer
[09:45:56] <kdehl> Very slow then, it seems.
[09:46:07] <kdehl> avrdude -c stk500 -p ATMEGA1284P -P /dev/ttyACM0 -U flash:w:main.hex
[09:46:11] <kdehl> That's what I use.
[09:46:27] <RikusW> a real stk500 ?
[09:46:36] <RikusW> hmm usb
[09:46:39] <Tom_itx> dragon i believe
[09:46:53] <kdehl> Yeah, USB, some cheap stk500 compatible programmer.
[09:48:47] <Tom_itx> what pins are D4..7 on?
[09:48:53] <Tom_itx> PORTA what pins?
[09:52:01] <kdehl> Tom_itx: http://pastebin.com/nSmPGh9D
[09:52:25] <kdehl> I just checked the pins on the breadboard, they seem correct.
[09:52:59] <Tom_itx> what pins are D4..7 on?
[09:53:12] <kdehl> Not connected.
[09:53:16] <kdehl> Should they be?
[09:53:23] <Tom_itx> you said you were using byte mode
[09:53:31] <Tom_itx> of course they must be connected
[09:53:39] <Tom_itx> you are using all 8 D lines
[09:53:46] <Malinuss> anyone knows if running a nop() uses as much current as any other instruction - is the power consumption lower when using _delay() compared to normal operation?
[09:53:58] <Tom_itx> kdehl, wanna try something?
[09:54:15] <kdehl> I thought that meant that I use all 8 bits instead of just 4 bits when communicating with the display? But I have connected them to port A.
[09:54:39] <kdehl> Oh yes. That's what you said. I thought you meant the PORTD pins on the AVR. Heh.
[09:54:48] <kdehl> Tom_itx: I'd try anything.
[09:55:00] <Tom_itx> what data lines do you have connected?
[09:55:11] <Tom_itx> from the lcd?
[09:55:20] <Tom_itx> and what avr pins do they go to?
[09:56:01] <kdehl> D1 - D8 on the display are connected to PINA0 - PINA7 on the AVR.
[09:56:10] <Tom_itx> ok
[09:56:25] <Tom_itx> unhook d1..4
[09:56:33] <Tom_itx> so we will use D5..8
[09:56:40] <kdehl> Hm. Okay.
[09:56:45] <Tom_itx> on PORTA 5..8
[09:56:54] <Tom_itx> which will actually be 4..7
[09:58:26] <kdehl> Connect the E, RS and R/W ?
[09:58:36] <Tom_itx> leave them where they are
[09:58:43] <kdehl> Ah, okay.
[09:59:08] <Tom_itx> ports are numbered 0..7
[09:59:40] <kdehl> Right.
[10:00:00] <Tom_itx> so hook your upper 4 data lines from the lcd to PORTA 4..7
[10:00:20] <Tom_itx> D 4..7 from the lcd to PORTA4..7
[10:00:59] <Tom_itx> RS is PORTB2, RW is PORTB3, Enable is PORTB4
[10:01:47] <kdehl> Right.
[10:02:39] <kdehl> Damn, damn, I disconnected d5...d8 instead.
[10:02:39] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/avr/LCD/kdehl/
[10:02:52] <kdehl> Man, you're great.
[10:02:52] <Tom_itx> load that file and try it
[10:02:55] <kdehl> Just a sec.
[10:04:15] <kdehl> So the upper four data pins D5...D8 on the display are to be connected to the upper four pins of PORTA (PINA4...PINA7) on the AVR, right?
[10:04:28] <kdehl> Annoying that the display counts from 1, but the AVR counts from 0.
[10:06:56] <Tom_itx> ready?
[10:08:18] <Tom_itx> bbiab
[10:09:34] <kdehl> Flashed it.
[10:09:44] <kdehl> But same problem, nothing happens...
[10:10:19] <kdehl> I just used the LCD.hex in that dir.
[10:11:15] <Tom_itx> make sure you know what clock speed you are running at
[10:11:22] <Tom_itx> double check the wiring
[10:11:33] <Tom_itx> beep test the connections if you are using a breadboard
[10:11:40] <Tom_itx> they tend to cause problems
[10:11:52] <Tom_itx> bbiab again
[10:12:41] <kdehl> But I did it right when I only used the upper pins, right?
[10:18:59] <kdehl> Gotta love that library, though.
[10:22:47] <Tom_itx> yes in nibble mode you use D5..8
[10:23:15] <Tom_itx> so D5..8 go to PORTA4..7
[10:24:41] <kdehl> Yup.
[10:24:45] <kdehl> Exactly so.
[10:24:56] <Tom_itx> now
[10:25:05] <Tom_itx> find out what clock speed your chip is running at
[10:25:22] <kdehl> How do I do that?
[10:25:43] <Tom_itx> check the fuses
[10:26:02] <Tom_itx> check the clock sources etc
[10:27:27] <kdehl> Hm. I have a very simple setup, no external oscillator or anything.
[10:29:25] <Tom_itx> default chips ship at 1mhz with ckdiv8 set
[10:29:37] <Tom_itx> and that's what i compiled it for
[10:29:59] <kdehl> Okay, that's probably it then.
[10:30:02] <kdehl> I tried:
[10:30:03] <kdehl> avrdude -c stk500v2 -p ATMEGA1284P -P /dev/ttyACM0 -U efuse:r:fuses.txt
[10:30:09] <Tom_itx> pull the code and work with it.. i know it works
[10:30:10] <kdehl> But fuses.txt is empty.
[10:30:18] <Tom_itx> con
[10:30:31] <Tom_itx> gotta go make breakfast now
[10:31:05] <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/how_to/atmega168/using_avrdude_index.php
[10:31:14] <Tom_itx> read / write fuses syntax
[10:31:52] <kdehl> Yeah, I'm starting to suspect there's something with the power supply... I'm using a simple mains adaptor that could be faulty. But the controller works, I've tried it with some button and a LED, and the display powers up... So I dunno.
[10:31:56] <kdehl> Ah. *checks*
[10:40:35] <Tom_itx> double check the contrast voltage too
[10:40:56] <Tom_itx> i've got some lcd's that require a negative bias
[10:42:05] <Tom_itx> pin 3 on the lcd
[10:42:31] <Tom_itx> woops... you forgot that one :)
[10:43:00] <kdehl> Hehe. No, I didn't. Unfortunately.
[10:43:13] <Tom_itx> gotta go for now
[10:43:25] <kdehl> But I don't have a potentiometer, maybe I just can't see it for the contrast settings?
[10:43:56] <kdehl> HELL YES!
[10:44:10] <Tom_itx> very possible
[10:44:21] <kdehl> Haha. I did put pin 3 to ground and suddenly God appeared from the heavens and fixed it for me.
[10:44:30] <Tom_itx> :D
[10:44:45] <kdehl> That's weird though.
[10:45:01] <Tom_itx> not if that's what it requires
[10:45:07] <kdehl> "Return to Line 1" "Starting up Line"
[10:45:17] <Tom_itx> there you go
[10:45:19] <kdehl> I thought I read it was supposed to go to 5 V.
[10:46:19] <kdehl> Well, thank you so much!
[10:48:11] <Tom_itx> np
[11:35:05] <dahj> if TIMSK1 = (1<<OCIE1A); command is executed during the run time of a program, does it call ISR(TIMER1_COMPA_vect) interrupt subroutine immediately?
[11:37:16] <dahj> I want to activate 16 bit timer. I don't want to call ISR(TIMER1_COMPA_vect) subroutine immediately. how can I do that?
[11:37:58] <OndraSter__> <dahj> if TIMSK1 = (1<<OCIE1A); command is executed during the run time of a program, does it call ISR(TIMER1_COMPA_vect) interrupt subroutine immediately?
[11:38:30] <OndraSter__> only if it is pending
[11:38:30] <OndraSter__> aka if OCIEF1A is set
[11:38:30] <OndraSter__> OCIF1A
[11:38:30] <OndraSter__> or whatever is the name of the flag
[11:38:31] <OndraSter__> dahj, on some megas there is a register bit "force OC"
[11:38:34] <OndraSter__> not sure if it calls the ISR
[11:39:11] <OndraSter__> what about putting the ISR code into some function
[11:39:11] <OndraSter__> and in the ISR just call the function?
[11:39:11] <OndraSter__> the same for your code
[11:40:06] <dahj> let me try that
[11:48:33] <dahj> OndraSter__:I tried it and got the same result. do you have some minutes to take a look at this code http://pastebin.com/4H2uP8iX I am trying to generate a pwm signal by using ISR(TIMER0_COMPA_vect) and ISR(TIMER0_COMPB_vect) after calling these fcn 4 times, I want program to wait for 5ms then continues the same routine. But when TIMSK1 = (1<<OCIE1A); is run, it calls the interrupt immediately, I guess. Here is oscillator output http://oi5
[11:49:18] <dahj> the signal toggles 4 times then it drops to zero instantly on the 4th time, I expected it to stay 1 and drops to zero after 5ms
[11:50:46] <dahj> do you know why the signal drops to zero instantly?
[12:50:34] <dahj> is it possible to activate a timer on the run-time without causing an instant interrupt?
[13:00:29] <OndraSter__> yes
[13:01:06] <OndraSter__> make sure it should not be firing right now
[13:01:06] <OndraSter__> and clear the interrupt pending flag
[13:20:42] <Malinuss> dahj, just to make it clear - the ISR vectors don't have anything to do with the pin firing (which is what you are measuring)
[13:21:35] <Malinuss> if you catch my drift
[13:29:18] <kdehl> _finally_, I found what was wrong with my LCD code.
[13:30:22] <kdehl> I had mixed up LCD_CONTROL_DIR with LCD_CONTROL in a subroutine. A stupid typo. Took me the whole day to figure out.
[13:37:35] <kdehl> Embarassing, really.
[13:38:56] <Malinuss> kdehl, get used to it
[13:40:52] <OndraSter__> classic stuff
[13:41:59] <kdehl> Heh. Good to hear I'm not the only one. :)
[13:43:59] <Malinuss> kdehl, I once used a whole day to figure out why my chip stopped working when my adc reading got down to this "magic number"... ofc. it was just connected to the RST pin ;)
[13:44:13] <kdehl> Hehe.
[13:44:24] <kdehl> Yeah, it happens I guess.
[13:44:55] <kdehl> Well, that's it. Display working. Now what?
[13:45:08] <kdehl> I have this PS/2 keyboard I should try out...
[13:45:25] <swart> roguelike on a uc!
[13:46:32] <kdehl> Heh.
[13:52:16] <Malinuss> kdehl, which display are you using?
[14:13:39] <r00t^home> dahj: a bit old, but your line got truncated... you should use an irc client that does not send lines longer than the server allows...
[14:13:53] <r00t^home> dahj: ... it calls the interrupt immediately, I guess. Here is oscillator output http://oi5
[14:15:51] <dahj> r00t^home: thank you, I solved the problem by using TCCR1B bits instead of using TIMSK1
[14:29:05] <kdehl> Malinuss: Some cheap stuff. HD44780 compatible, Tom_itx said.
[14:34:01] <kdehl> Malinuss: http://www.egochina.net.cn/eBay/Download/JHD162A.pdf
[14:34:04] <kdehl> That's the manual for it.
[14:49:57] <OndraSter__> I don't suppose anybody here has ever built audio amp with SPDIF/optical input?
[15:26:59] <creep> rikus how is this new?
[15:27:16] <creep> photovoltaic optocoupler ...
[15:35:30] <tzanger> OndraSter__: toslink rx feeding into what?
[15:39:33] <creep> OndraSter__<< how is that special?
[15:40:02] <creep> pipe through pcm data and output to adc
[15:47:04] <tzanger> you mean DAC, but toslink isn't always pcm, you'd have to mute for invalid/differently-coded data
[15:47:09] <tzanger> or you'd have just loud noise
[15:59:49] <OndraSter__> tzanger, I have never tried SPDIF
[15:59:54] <OndraSter__> let it be in coax or in optical way
[16:00:00] <OndraSter__> output from sound card in your PC
[16:21:05] <creep> tzanger<< yea dac
[16:34:28] <tzanger> OndraSter__: read up on what can come in on that port; you need something that can understand digital audio, etiher a micro or a codec
[16:34:52] <OndraSter__> sure I did
[16:34:56] <OndraSter__> I checked some cirrus chips
[16:35:28] <OndraSter__> they have got multichannel spdif rx + tx (huh, PC does not have SPDIF rx for mic lol) with DACs
[16:35:38] <OndraSter__> 192kHz sampling @ 24bit delta-sigma DACs
[16:35:50] <OndraSter__> they did not look that bad
[16:35:59] <OndraSter__> and they were <7€ for the top ones
[16:36:09] <OndraSter__> (I don't think I would be building more than few pieces, but still)
[16:36:16] <OndraSter__> and integrate a good amplifier to it
[16:36:25] <OndraSter__> that can drive my 4Ohm 30W-ish speakers
[16:36:31] <OndraSter__> quality 30W, not chinese 30W though
[16:37:35] <tzanger> hm, I just realized my use of MCLR# for a zero-cross detect won't work. it'll be held in reset for 8ms. lol
[16:37:43] <OndraSter__> haha
[16:37:44] <OndraSter__> yeah
[16:37:52] <tzanger> time to swap that pin with the INT0 pin and disable MCLR#
[16:38:41] <tzanger> that really fucks with my layout now. balls
[16:51:17] <RifRaf> help, doc says,, uint8_t * 'writeData' The memory address of the data to be written.
[16:51:33] <RifRaf> TCS3414.send(1,0xB6); // I2cDevice. send(writeLen,writeData)
[16:51:43] <RifRaf> what am i doing wrong?
[16:58:57] <tzanger> ok that cleaned that up
[17:00:05] <creep> OndraSter__<< how about a codec like one from a motherboard? :)
[17:01:55] <OndraSter__> creep, I am not sure that they have got SPDIF input :P
[17:02:21] <creep> no, they get PCM input data
[17:02:30] <OndraSter__> how would that help me?
[17:49:53] <creep> increasing ADC precision by adding noise to ADC inputs :) hahaha http://www.atmel.com/Images/doc8003.pdf
[17:50:14] <creep> so, will you still want filtering ?
[17:51:32] <OndraSter__> I am aware of that
[17:51:42] <OndraSter__> somebody here made "18bit" ADC from the 10bit...
[17:51:45] <OndraSter__> can't remember who
[17:52:33] <creep> sounds interesting...
[17:53:03] <OndraSter__> I don't think that adding more than 1 or 2 bits has any real use
[17:53:04] <creep> i usually want to average the input, not just take a sample and use
[17:53:19] <OndraSter__> I like xmega with their 2MSPS 12bit ADCs :P
[17:53:21] <creep> yes it would need to be a few bits of noise only
[17:53:26] <creep> +-1 would do
[17:53:30] <OndraSter__> where two conversions (per ADC module!) can run nearly at the same time
[17:53:39] <OndraSter__> note that higher end xmegas have got two ADC modules
[17:54:25] <creep> it is something like sigma delta
[17:54:47] <OndraSter__> well, you can always get TI's 31 or 32 or whatever bit ADC :P
[17:54:55] <creep> sure
[17:55:00] <OndraSter__> they even sampel them
[17:55:01] <OndraSter__> sample*
[17:55:06] <creep> 32 bit ADC sounds fun
[17:55:10] <OndraSter__> my friend made a nice multimeter with 24bit one
[17:55:12] <OndraSter__> :D
[17:55:22] <creep> measure microcelsius with a PT100
[17:56:52] <OndraSter__> oh noas, mouser has got new layout
[17:57:00] <OndraSter__> and they broke my search shortcut in Opera
[17:57:03] <creep> hm multimeter...
[17:57:19] <tzanger> hm it seems I could have left my layout the way it was, just not used reset to wake but rather pin change
[17:57:23] <creep> and measuring what?
[17:57:27] <creep> 0-5V ?
[17:57:29] <Tom_itx> OndraSter__, did they screw it all up?
[17:57:49] <OndraSter__> Tom_itx, well it enters the search text into the field, but I have to click the search button :(
[17:57:55] <OndraSter__> I have to remake it!
[17:58:03] <OndraSter__> which means deleting the old one from settings and right clicking on mouser's webpage again!
[17:58:06] <OndraSter__> FOUR CLICKS!
[17:59:00] <creep> OndraSter__<< well sounds nice project tobuild a supercool multimeter free from ti samples, if you have the time, pick up some multiplexers, adcs, microcontrollers, and INA diff amps, you can get interesting measuring equipment
[17:59:28] <tzanger> the datasheet says that pin change interrupts are detected asynchronously, but INT0 pin change needs the ioclk
[17:59:28] <OndraSter__> :P
[17:59:34] <OndraSter__> creep, he built it from the TI samples, yes
[17:59:42] <OndraSter__> tzanger, no it does not
[17:59:44] <OndraSter__> PCINT does
[17:59:46] <OndraSter__> INT does not
[18:00:24] <creep> OndraSter__<< i somehow do not like the MPS430 micros ;/
[18:00:44] <creep> *MSP430
[18:00:49] <OndraSter__> heh
[18:01:01] <OndraSter__> I have got here MSP launchpad..
[18:01:05] <OndraSter__> and two Stellaris launchpads :D
[18:01:09] <OndraSter__> unopened packages
[18:01:10] <creep> though MSP430F412IPM <<< $1.3 LQFP64
[18:01:32] <creep> 16 bit 8MHz max
[18:01:44] <OndraSter__> $1.3 where?!
[18:01:56] <creep> $1ku @ ti
[18:02:01] <OndraSter__> oh
[18:02:49] <creep> http://www.ti.com/product/msp430f412
[18:02:57] <OndraSter__> yes
[18:03:00] <OndraSter__> I can use google :)
[18:03:51] <creep> Suggested Resale Price per unit (USD) for BUDGETARY USE ONLY.
[18:03:58] <creep> $1.3 @ 1ku
[18:04:09] <tzanger> OndraSter__: yeah, so I can route my shit back the way it was (it was "prettier"), disable MCLR# and just use PB5 as interrupt on change to do what I want
[18:04:13] <tzanger> much nicer.
[18:04:27] <OndraSter__> why do you call it MCLR? We are not PICs!
[18:04:45] <OndraSter__> :P
[18:04:57] <creep> OndraSter__<< i switched to bing, it is less crap :(
[18:05:02] <Tom_itx> they want converts to feel comfortable
[18:05:05] <OndraSter__> creep, :o
[18:05:10] <creep> but sometimes i have to get back to the google to get more results
[18:05:13] <OndraSter__> yeah
[18:05:19] <OndraSter__> some people call me MS fag
[18:05:23] <OndraSter__> I use bing on my phone and laptop
[18:05:31] <OndraSter__> google on my PC because it is set as default
[18:05:33] <OndraSter__> and I am too lazy to change it
[18:06:05] <creep> well now google is becoming very shitty
[18:06:17] <creep> evil
[18:06:49] <OndraSter__> damn, the auto-setting for automatic search in Opera didn't work for mouse
[18:06:49] <OndraSter__> r
[18:06:51] <OndraSter__> let's hack it
[18:06:56] <OndraSter__> and change to bing while I am at it as the default one
[18:07:26] <OndraSter__> there we go
[18:07:28] <OndraSter__> http://cz.mouser.com/Search/Refine.aspx?Keyword=%s
[18:07:31] <OndraSter__> if anybody needs it
[20:09:12] <creep> #programming-banned anyone?