#avr | Logs for 2014-03-19

Back
[00:01:34] <clixx_IO> I'm still recovering from my LCD
[00:02:15] <clixx_IO> this is why open-source sucks sometimes - he gave the hardware design and python code then ran away
[00:03:33] <clixx_IO> and I wanted something for AVR, and of course python doesn't work that well on AVR
[00:03:35] <tzanger> clixx_IO: I like them
[00:03:49] <tzanger> nothing wrong with people running away
[00:04:00] <tzanger> I by far prefer they run away and leave shitty source behind than a binary blob
[00:04:58] <tzanger> found an interesting libaray: u8glib
[00:05:07] <clixx_IO> I'm not really complaining - I tremendously appreciated his input
[00:06:01] <clixx_IO> but talking about it, I have a new idea how to get it going
[00:07:04] <clixx_IO> instead of trying to hack a standard library, I should just convert his python code to C++ line by line
[00:09:03] <clixx_IO> * thinking aloud
[00:09:52] <clixx_IO> this should go back to C/C++ where it came from pretty easily https://github.com/clixx-io/clixx.io/blob/master/src/clixxIO_CharLCD.py
[00:13:47] <clixx_IO> I'm not really a bit-banging expert so much
[00:21:25] <Xark> clixx_IO: Yeah, looks fairly straightforward to port.
[00:24:09] <clixx_IO> yeah, I was just thinking that. The problem is the electronics wiring doesn't match up exactly with the published ones
[00:24:48] <clixx_IO> and my concentration levels are not what they used to be
[00:25:49] <clixx_IO> after this is done, then I will be allowed to do OLEDs
[00:32:32] <clixx_IO> hmm - thanks guys
[11:08:59] <wip> i have 6 timers available on my atmega640. i will be able to use only 6 simultanous PWM fast frequency for audio purpose because i can only set 1 ICRX for both OCRxAB channel?
[11:13:15] <wip> or maybe there's a way to use all channels (12) and set individual frequencies for each channel?
[11:20:24] <Casper> wip: on avr, the timers often share the same counter source in pair
[11:20:50] <Casper> so 6 timers can be only 3 counters, but you can change the duty of each pwm
[11:22:15] <wip> Casper: changing the duty of each pwm != different frequency right
[12:00:35] <phinxy> im starting to make icons for my LCD. im using a atmega1284 but im planning on using attiny on my final project
[12:00:49] <phinxy> how many bytes can i use approx?
[12:03:21] <phinxy> a 32x32 icon would take up 128 bytes. my atmega is 128K bytes. is this 12,5% of the memory??
[12:03:34] <phinxy> or is it kb or something?
[12:08:15] <twnqx> 128 bytes is about 0.1% of 128kbytes, but only if you put it into progmem
[12:08:25] <twnqx> RAM is separate from flash
[12:08:45] <twnqx> by default coding, your icon would go into ram, not flash (only)
[12:09:07] <twnqx> you probably want to read up on progmem for storing larger amounts of data
[12:31:43] <wip> my conclusion (would love to have confirmation on this): timer0 have only ICR0 to set counter, but 2 channels to set duty cycles. with this configuration I cannot use both channels to output 2 diffrent frequency (ie: 220hz and 440hz) simultanously?
[12:45:01] <braincracker> hello my friends
[12:45:06] <braincracker> what is the situation?
[13:52:07] <rue_mohr2> wip, which chip?
[13:52:15] <rue_mohr2> 640
[13:58:41] <rue_mohr2> wip, you need to understand pwm better,
[13:58:51] <rue_mohr2> pwm has freq and duty,
[13:59:30] <rue_mohr2> if two pwm channels come from the same timer, they run the same freq, but they can both be at different dutyies
[14:00:09] <rue_mohr2> ___-____-____-____ < thats 20% duty
[14:00:30] <rue_mohr2> ___--___--___--___ < -- thats 40% duty
[14:00:39] <rue_mohr2> same freq, different duty
[14:09:48] <phinxy> if i declare an signed 8int. can i set that to -1 and substract 1 from an unsigned 8int?
[14:10:33] <phinxy> or would i rather have both as unsigned integers and use something like: x = 1; y -= x;
[14:13:40] <rue_mohr2> you can mix maths, sometimes you need to get funky making sure of the order that it does the math in
[14:14:47] <wip> rue_mohr2: merci! so in my case (atmega640 with 6 timers (12 channels)) i will only be able to use 6 frequency simultanously, there's no way of using all 12 channels with 12 different frequency?
[14:19:33] <rue_mohr2> the freq is determined by the clock select bits of the timer
[14:21:38] <Roklobsta> anyone use 32768hz xtals at all on avr?
[14:21:44] <rue_mohr2> I have
[14:21:54] <rue_mohr2> and 32000hz
[14:24:38] <wip> yes, i know return (F_CPU / (prescaler * frequency)) - 1;
[14:26:32] <wip> that is to set ICRX and to set the duty cycle to 50%
[14:30:07] <rue_mohr2> OCRx
[14:30:21] <rue_mohr2> ICRx is for capturing pulses
[14:30:51] <rue_mohr2> wip, would you like to give us an idea of what it is your trying to do and maybe we can help you do it?
[14:32:40] <wip> i am trying to output 12 simultanous & unique frequency (ie: 220hz, 440hz, 880hz,...) using an atmega640
[14:33:06] <Roklobsta> rue_mohr2: ok so you use the 32khz for a RTC off timer 2 and the internal 8MHz clock for system?
[14:38:36] <Tom_itx> or external 16Mhz whatever
[14:40:47] <Roklobsta> 48 has only one xtal input
[14:42:09] <Roklobsta> also how accurate is the factory calibration of the internal clock? should i whip out a GPS PPS and do my own cal?
[14:42:25] <Tom_itx> sure
[14:44:26] <Roklobsta> meh as long as the 32khz clock is stable enough i dinnae care about *MHz
[14:44:28] <Roklobsta> 8
[14:44:35] <Roklobsta> haha capital 8. *
[14:46:01] <Tom_itx> that one has both crystals on it: http://tom-itx.dyndns.org:81/~webpage/misc_stuff/mega128.jpg
[15:04:11] <Roklobsta> ah ok, let me look up the data sheet
[15:07:05] <Roklobsta> 128 has 2 oscillator input by the looks of it. 48 has one
[15:49:32] <rue_mohr2> Roklobsta, I'v used 32.768khz and 32.000khz external for rtc
[15:49:50] <rue_mohr2> one is good for 1 second resolution, one for 1/100 sec resolution
[16:19:30] <Roklobsta> rue_mohr2: so you sleep the cpu and wake the system up once a second (based on 32khz irq) to increment the time?
[16:23:57] <rue_mohr2> hell no I have it doing a million other things in the main loop
[16:24:28] <rue_mohr2> my project needed time tracking, but wasn't a clock
[16:36:48] <FreezingCold> Yesterday we were talking about i2c interfaces through VGA
[16:36:52] <FreezingCold> thought this might be useful
[16:36:53] <FreezingCold> http://www.ebay.ca/itm/DB9-D-SUB-VGA-female-jack-9pin-port-Terminal-Breakout-PCB-Board-2-row-screw-/271288172145?pt=US_Radio_Comm_Coaxial_Cables_Connectors&hash=item3f2a08fe71
[16:38:04] <FreezingCold> oh never mind, that's not VGA
[16:39:29] <rue_mohr2> vga has an i2c signal set in it, yes
[16:40:07] <twnqx> but vga is not dsub9
[16:40:38] <rue_mohr2> I dont knwo if the bus is available to anything but the video chipset
[16:40:38] <FreezingCold> twnqx: [17:20:54] <FreezingCold> oh never mind, that's not VGA
[16:40:41] <FreezingCold> I noticed after
[16:40:45] <FreezingCold> rue_mohr2: in linux it is
[16:40:54] <rue_mohr2> vga is a 15 pin high density version of the db9
[16:41:51] <FreezingCold> Yep
[16:42:23] <rue_mohr2> http://image.pinout.net/pinout_vga_files/vga_pinout.jpg
[16:42:26] <rue_mohr2> SDA SCL
[16:42:46] <FreezingCold> I know
[16:42:53] <rue_mohr2> k
[16:43:00] <FreezingCold> [17:23:28] <FreezingCold> twnqx: [17:20:54] <FreezingCold> oh never mind, that's not VGA
[16:44:23] <rue_mohr2> http://people.ece.cornell.edu/land/courses/ece4760/FinalProjects/s2012/raf225_dah322/raf225_dah322/images/vga_pinout.gif
[16:44:25] <rue_mohr2> thats a nice one
[16:44:35] <rue_mohr2> what you doin with the i2c?
[16:46:00] <FreezingCold> replacing rs232 probably
[16:46:40] <rue_mohr2> oh your not doing something funkey that you just need an i2c bus for then
[16:47:30] <FreezingCold> na I already have a few RS232 connectors
[16:47:46] <rue_mohr2> like your not putting in i2c io exander on there and using the sensorsd utilities to operate disco lights
[16:48:40] <FreezingCold> welllll.... I'll admit I was considering that too...
[16:49:09] <FreezingCold> kinda read my mind lol
[16:49:34] <rue_mohr2> or hanging an i2c lcd off the botom of your monitor with lcdproc info
[16:51:03] <rue_mohr2> I need a new tea cup, this one is always empty
[16:51:35] <twnqx> my idea is still to hang an ethernet chip off of that
[16:51:44] <twnqx> since some companies glue all connectors shut
[16:51:50] <twnqx> but not the VGA for presentations :P
[16:52:22] <rue_mohr2> I bet there is a way to jab in a second i2c chip that uploads a windows virus
[16:52:42] <twnqx> yeah
[16:52:52] <rue_mohr2> prolly via some stupid buffer overflow exploit
[16:52:58] <twnqx> i was wondering if you could overflow some EDID decoder
[16:53:03] <FreezingCold> fun idea
[16:54:23] <rue_mohr2> you would think after one buffer overflow ms would go thru all their code and fix all the buffer code
[16:54:36] <FreezingCold> ugh I hate how there doesn't seem to be any db15 to 0.254mm pinouts
[16:54:54] <rue_mohr2> it must be like trying to fix code where someone has used 100% global variables, its just eaiser to start from scartch
[16:55:46] <rue_mohr2> I ran out of advil, I'm gonna try to go unconcious before the effect of the last one completely wears off
[16:59:02] <FreezingCold> Why are all the connectors flying out of this thing?
[16:59:03] <FreezingCold> http://www.ebay.ca/itm/DB9-Female-to-RJ45-Female-F-F-RS232-Modular-Adapter-Connector-Convertor-Extender-/150947741902?pt=US_Audio_Cables_Adapters&hash=item23252fc0ce
[16:59:56] <rue_mohr2> you configure them how you want
[17:00:06] <rue_mohr2> they clip into the sb9 part
[17:00:09] <rue_mohr2> db9
[17:00:29] <rue_mohr2> the db9 part is aparently not included
[17:03:41] <FreezingCold> ah that's kinda pointless
[17:06:08] <FreezingCold> so laptop is gonna shut off any moment
[17:06:10] <FreezingCold> 0%
[18:00:15] <ColdKeyboard> Anyone else having microchip forum issues or it is just me?
[18:02:12] <Casper> who knows, this is #avr, not #pic
[18:02:37] <mdszy> ^
[18:04:09] <ColdKeyboard> I know but there is a lot off-topic chat so... my question is not harmful to anyone...at least I hope so :)
[18:06:47] <Lambda-Aurigae> the PAIN!
[18:06:59] * Lambda-Aurigae clasps his hands over his knees and cries.
[18:28:24] <rue_mohr2> ColdKeyboard, PICs aren't even worth the free samples, avr rules.
[18:29:05] <ColdKeyboard> I have to use them for my collage project so I'm kinda stuck with them at the moment :\
[18:32:07] <Lambda_Aurigae> there...12GB ram and no swap!
[18:42:46] <mdszy> ColdKeyboard: if I had to use PICs for a colleged project I'd drop out.
[18:44:32] <Casper> ColdKeyboard: suffer! :D
[18:44:49] <ColdKeyboard> Thanks :)
[18:44:56] <Casper> mdszy: but! the pic is the industry standard! ...
[18:45:10] <Casper> I see them less and less in stuff
[18:45:12] <mdszy> Casper: I'd drop out of the industry wherever that's standard.
[18:46:09] <Casper> so, for mh370... some say that it's common practice to carry extra fuel when they travel to china due to the high cost of the fuel there
[18:46:29] <Casper> so it is possible that they fulled up the plane before takeoff in malaysia...
[18:46:39] <Casper> if that's the case, then it's 9 hours, not 7...
[18:46:56] <Casper> and with all the surprises... I wouln't be surprised if it was the case
[20:24:00] <braincracker> Lambda_Aurigae only 12GB? :(
[20:24:08] <Lambda_Aurigae> yeah.
[20:51:42] <Fiesta> woa i didn't even know this channel existed
[21:07:06] <inflex> It doesn't, you're imagining it.
[21:32:24] <N1njaneer> Hello guys, I've missed you!
[21:34:00] * Casper throws a snowball at N1njaneer
[21:34:01] <Casper> hi ya
[21:34:49] <N1njaneer> Hiyas!
[21:51:00] <braincracker> hiya N1njaneer
[21:51:08] <braincracker> avr ninjutsu ?