#avr | Logs for 2015-07-19

Back
[01:57:33] <redspl> hi guys
[02:00:26] <Hexum064_2> hey
[07:02:52] <Lambda_Aurigae> morning human type beings
[07:02:57] <Lambda_Aurigae> and rue_bed
[07:06:39] <Thrashbarg> implying
[07:10:44] <Lambda_Aurigae> no implying to it.
[07:10:51] <Lambda_Aurigae> some of us aren't human.
[07:10:59] <Lambda_Aurigae> the rest of you, unfortunately, are.
[07:11:25] <Thrashbarg> yes ._.
[08:12:28] <antto> i see many types of rues
[08:14:39] <Lambda_Aurigae> and none human to my knowledge.
[10:27:45] <hypermagic> hi
[10:28:33] <hypermagic> sup Lambda_Aurigae
[10:28:41] <hypermagic> tdid you assume im human ?
[11:42:31] <naquad> how do i put AVR into sleep so only interrupts are handled? i have only initialization in main() and while(1); currently, thinking to save some batteries and put the core into the sleep mode
[11:46:45] <Lambda_Aurigae> naquad, have you read the datasheet?
[11:47:36] <Hexum064_2> Lambda_Aurigae sometimes reminds me of the IT Crowd "Have you tried turning it off and back on again"
[11:47:49] <naquad> yes, after that i have some mess in the head that translated to: while (1) { set_sleep_mode(SLEEP_MODE_IDLE); sleep_enable(); sleep_cpu(); } - which doesn't work very well
[11:47:51] <Lambda_Aurigae> hehe.
[11:47:55] <Hexum064_2> It's his version of RTFM -> RTFDS
[11:47:59] <Hexum064_2> lol
[11:49:39] <Lambda_Aurigae> http://www.avrfreaks.net/forum/how-put-atmega8-sleep-mode
[11:50:29] <Lambda_Aurigae> starting to get real fed up with google search.
[11:50:42] <Lambda_Aurigae> I search for avr and 80% of the links are ardweeny crap.
[11:50:54] <hypermagic> :)
[11:51:10] <hypermagic> search for something meaningful then
[11:51:35] <Lambda_Aurigae> it would be like searching for information on a core-2 duo processor and getting a bunch of links to apple icrap.
[11:52:55] <hypermagic> sleep mode would be totally unnecessary in asynchronous systems
[11:53:57] <hypermagic> idle = no power draw, computing = power usage
[11:54:15] <hypermagic> but the trend is to waste as much power as possible
[11:54:59] <hypermagic> a pc is good actually to heat a room, so you effectively get a free pc with a heater
[11:55:16] <Lambda_Aurigae> woohoo! got it! put -arduino in my search and it goes AWAY!
[11:55:52] <hypermagic> haha
[11:56:08] <hypermagic> that sounds like 90% efficiend keyword
[11:56:56] <hypermagic> or you might try to add more descriptive words what you are looking for
[11:57:09] <hypermagic> ardweenie noobs do not write technical details
[11:57:30] <Lambda_Aurigae> I do add more descriptive words.
[11:58:00] <hypermagic> for example the ardweenie page might not even contain atmel avr atmegaxxx in it
[11:58:15] <Lambda_Aurigae> actually, they often contain a tag to avr
[11:58:25] <hypermagic> sure
[11:58:39] <Lambda_Aurigae> and google has started associating the two.
[11:59:32] <Lambda_Aurigae> yahoo is basically a useless pile of advertising and viruses.
[11:59:35] <hypermagic> atmel mcu c microcontroller too ?
[11:59:40] <Lambda_Aurigae> bing is just flippin useless.
[12:02:40] <rue_shop3> http://www.fourwalledcubicle.com/files/freaks/timerstutorial/PWM%20Modes.gif
[12:38:20] <Hexum064_2> ok, so I know everyone complains when I ask an xmega question. But hopefully this one is generic enough to not just be about xmega. I have my xmega set up with an interrupt on portd.pin0 on rising edge. In my ISR, I clear the interrupt and toggle the output of another pin. I have that pin attached to my logic analyzer. It seems that sometimes the t
[12:38:20] <Hexum064_2> oggle happens twice, one immediately after the other. Any ideas why?
[13:49:36] <tpw_rules> "16-bit data transfer can be achieved by writing two data bytes to UDRn. A UART transmit complete interrupt will then signal that the 16-bit value has been shifted out." from the 328p datasheet regarding SPI. has anybody tried this?
[13:50:16] <tpw_rules> Hexum064_2: your input signal may be noisy, causing it to go low and high again shortly after you clear the interrupt
[14:23:41] <Hexum064_2> I was checking that. I was actually how I was manipulating other outputs. It was working just fine.
[15:12:03] <naquad> has anyone here tried to control relay modules through 74hc565? i've got 16 relay module connected to attiny2313a via 2x74hc565 and can't get that working :( looks like i'm missing something and not sure what
[15:12:46] <Lambda_Aurigae> well,
[15:12:57] <Lambda_Aurigae> how much current does the relay draw?
[15:13:22] <Lambda_Aurigae> what relay is it?
[15:13:36] <naquad> nothing at the moment, and it has additional power supply
[15:13:40] <naquad> so its not about power
[15:13:40] <Lambda_Aurigae> is the 74565 actually working?
[15:13:50] <naquad> yes, tester shows ~5V
[15:14:19] <naquad> you know what...
[15:14:29] <naquad> it looks like i have a stupid question actually
[15:14:50] <naquad> is there a way to make 75hc565 to provide GND rather than VCC
[15:14:51] <naquad> ?
[15:14:59] <Lambda_Aurigae> output 0
[15:15:39] <Lambda_Aurigae> you sure it's 74hc565?
[15:16:51] <Lambda_Aurigae> because I don't see that listed in the 74 series chips.
[15:17:14] <naquad> SN74HC595N
[15:17:20] <Lambda_Aurigae> aahh
[15:17:26] <Lambda_Aurigae> you said 565 earlier.
[15:18:17] <naquad> sorry :( already got head ache with that automation project
[15:27:58] <naquad> houray! it figures out i've had to reconnect the OE
[15:28:02] <naquad> after that everything is finally working
[15:28:07] <Lambda_Aurigae> when set to 0 it effectively connects to GND
[15:45:19] <naquad> is it very-very bad to use goto in parsing routines or is it tolerable?
[15:48:20] <Lambda_Aurigae> well,
[15:48:29] <Lambda_Aurigae> depends on your school of programming
[15:48:41] <Lambda_Aurigae> some people say if you use goto then you are a pathetic whiny loser.
[15:48:49] <Lambda_Aurigae> others say goto is only used by real men.
[15:49:36] <inkjetunito> naquad: nested loops?
[15:51:14] <Tom_itx> so which school of thought are you from Lambda_Aurigae?
[15:51:27] <Lambda_Aurigae> use whatever works.
[15:51:39] <Lambda_Aurigae> real men are usually pathetic whiny losers
[15:51:40] <Tom_itx> until it bites you?
[15:51:53] <Lambda_Aurigae> if it bites me it will probably die of food poisoning.
[15:52:31] <Lambda_Aurigae> in assembly I used jmp or the processor equivalent of jump which is the same as goto for many many years.
[15:52:56] <Tom_itx> that's true
[15:53:38] <naquad> https://gist.github.com/c619bc4b52823dbd8939 - 116-200, a huge state machine. to save some space (i'm on attiny2313a) instead of real number parsing and recursion i'm jumping there and backwards with goto statements
[15:54:01] <Lambda_Aurigae> goto in a state machine.
[15:54:03] <Lambda_Aurigae> hmmm.
[15:54:46] <Lambda_Aurigae> again, whatever works.
[15:55:09] <Lambda_Aurigae> and that's not a huge state machine.
[15:55:15] <Lambda_Aurigae> small to middlin.
[15:55:42] <naquad> i'm more a scripter guy (Python, Ruby, PHP) and for me everything longer than 30 lines is already a behemoth
[15:55:54] <Lambda_Aurigae> bah.
[15:56:30] <Lambda_Aurigae> script kiddies...
[15:56:30] <Lambda_Aurigae> hehe
[15:58:12] <Lambda_Aurigae> I was just building a state machine in my head friday while driving between customers.
[15:58:29] <Lambda_Aurigae> code for it was tiny,,,half of yours or smaller,,,
[15:58:42] <Lambda_Aurigae> the state data could have been huge.
[16:00:04] <naquad> well, ok. lets hope i won't go to hell for that goto invocation :)
[16:00:21] <Lambda_Aurigae> naa
[16:00:25] <Lambda_Aurigae> you will just go to heck.
[16:00:31] <naquad> hehe i'm there :D
[16:02:31] <naquad> looks like the plan with sleep mode + USART won't work. and i'm not the only one: http://www.avrfreaks.net/forum/uart-sleep-mode . so the question is: are there any non-busy wait facilities in avr? i want it to idle until USART RX/TX needs to happen
[16:03:06] <Lambda_Aurigae> do while(1)
[16:03:19] <naquad> thats a busy wait as i understand. and i already have it.
[16:03:35] <naquad> or am i seeing problem that doesn't exist?
[16:03:40] <Lambda_Aurigae> dunno.
[16:03:49] <Lambda_Aurigae> no clue what your problem is or what you are trying to solve.
[16:04:16] <naquad> well, i need only USART + pin kicking from several routines based on USART input, everything else should go to sleep
[16:05:12] <Lambda_Aurigae> interrupt routines won't do it?
[16:05:26] <naquad> already using them
[16:05:41] <naquad> i just want to maybe lower power consumption a bit
[16:06:19] <Lambda_Aurigae> and it won't wake on usart received data interrupt?
[16:06:49] <naquad> it wakes up, but loses data or has some garbage instead of the input
[16:10:04] <Lambda_Aurigae> send a wakeup byte of data first?
[17:05:41] <naquad> Lambda_Aurigae, i would prefer to avoid that
[17:12:28] <postmodern> so im trying to modify some SPI code that talks to an ili9341 to use the 8-bit parallel interface instead
[17:12:46] <postmodern> i'm toggling all the pins correctly according to Saleae
[17:13:06] <postmodern> but nothing seems to be recognized
[17:13:26] <postmodern> wondering if it could be a timing issue? maybe i'm not giving it enough time to latch the data bits before the rising edge of WR?
[18:23:01] <Casper> postmodern: it's possible
[19:03:26] <postmodern> Casper, i've looked a other example code (linux based GPIO) and they don't use any delays
[19:03:44] <postmodern> Casper, well only delay is between toggling the RST pin
[19:06:07] <Casper> have you actually set the pins as output? the DDR...
[19:06:43] <postmodern> Casper, yep
[19:07:12] <postmodern> Casper, http://paste.fedoraproject.org/245917/43734944
[19:13:56] <postmodern> the RD pin is wired to VCC since i'm only writing
[19:15:01] <Casper> void ili9341_parallel_write(uint8_t byte) <=== try a nop between the 2 control write
[19:22:53] <postmodern> Casper, i definitely see a small dip in the WR line
[19:23:34] <postmodern> approximately 0.25us long
[19:41:11] <postmodern> Casper, how could i debug the LCD itself?
[19:41:24] <postmodern> Casper, i an sniff all the external pins with the Saleae
[19:41:44] <postmodern> but not what the controller chip on the LCD itself
[19:44:02] <Casper> postmodern: try the nop first, chance is that it will work
[19:46:26] <postmodern> Casper, nop did not work
[19:46:32] <postmodern> Casper, although i have -Os on
[19:46:46] <postmodern> also tried a _delay_us(5)
[19:47:34] <Casper> check the pseudo assembly to see what damage it did.. but... I'm too busy to look into it more