#avr | Logs for 2012-08-01

Back
[02:02:01] <molavy> hi
[02:02:43] <molavy> what is problem of this code
[02:02:44] <molavy> http://dpaste.com/779204/
[02:03:22] <molavy> lcd backlight is on,but do not show any character
[02:03:27] <molavy> any idea?
[02:05:19] <theos> read the manual
[02:06:37] <molavy> manual?
[02:06:46] <molavy> link?
[02:07:22] <theos> you have the lcd module
[02:07:39] <molavy> yes
[02:07:49] <molavy> character lcd
[02:07:59] <theos> how many rows?
[02:08:56] <molavy> 16*2
[02:09:35] <theos> did you specify which row should display which characters?
[02:11:05] <molavy> i read and use this code: http://www.avrbeginners.net/interfacing/44780_lcd/8bit_c.html
[02:11:22] <molavy> how can i use this code?
[02:11:42] <theos> http://www.kanda.com/AVR-C-Code-LCD.php
[02:12:28] <theos> your link says "Also make sure to have a valid contrast voltage at pin 3 of the LCD (0..1.5V), or just tie it to ground. The LCD this code was tested with is a Displaytech 164A (16x4 characters) LCD."
[06:56:44] <Posterdati> hi
[06:57:38] <Posterdati> I need help with avr-g++, I created a template class (template <int nType> lsm303dlhc;) and I've got a lot of undefined reference to template class member functions during linking...
[07:05:44] * RikusW haven't used templates much....
[07:05:57] <RikusW> so I'm probably more clueless than you :-P
[07:06:40] <Posterdati> RikusW: http://stackoverflow.com/questions/614233/undefined-reference-to-function-template-when-used-with-string-gcc
[07:20:41] <Posterdati> solved!
[07:25:01] <Posterdati> IndianaRonaldo: are you Cristiano Ronaldo cousin?
[09:51:31] <IndianaRonaldo> Posterdati, yes I am...:D
[09:55:50] <Posterdati> ok
[11:36:24] <OndraSter> hmmm what is better? Matte Tin or NiPdAu lead finish?
[11:36:40] <CapnKernel> For what?
[11:36:43] <OndraSter> (how can it be lead finish when there is no Pb?)
[11:36:46] <OndraSter> on a chip
[11:36:50] <OndraSter> it is attiny13a
[11:36:53] <CapnKernel> Pd or Pb?
[11:36:53] <OndraSter> exists in both versions
[11:36:57] <OndraSter> NiPdAu
[11:37:06] <OndraSter> it is Pb-free, all of them
[11:37:13] <CapnKernel> Pd or Pb?
[11:37:20] <Kevin`> maybe they mean leed finish, not led finish
[11:37:21] <OndraSter> Pd
[11:37:43] <CapnKernel> Kevin`: You could be right.
[11:37:46] <OndraSter> 1. Code indicators:
[11:37:46] <OndraSter> – H or 7: NiPdAu lead finish
[11:37:46] <OndraSter> – U, N or F: matte tin
[11:37:46] <OndraSter> – R: tape & reel
[11:37:46] <OndraSter> 2. All packages are Pb-free, halide-free and fully green and they comply with the European directive for Restriction of Hazardous
[11:37:46] <OndraSter> Substances (RoHS).
[11:38:13] <OndraSter> nickel-palladium_gold lead finish
[11:38:17] <OndraSter> even TI has it
[11:38:18] <CapnKernel> Yeah
[11:39:34] <OndraSter> oh lead as pin
[11:39:35] <OndraSter> not as Pb
[11:39:40] <OndraSter> bloody english!
[12:39:28] <megal0maniac> Hi all. I'm keen on teaching myself AVR C. Started off with Arduino, moved on to modifying other peoples' source. But I'm looking for something structured to teach myself from. Doesn't have to be free. Any recommendations?
[12:39:39] <smeding> how's your command of C?
[12:40:06] <smeding> be very familiar with the basic C programming language, in particular the bitwise operators
[12:40:33] <megal0maniac> It's not great, but I've got the basics down. Pretty good in Java, so common things like bitwise operators, classes etc I'm comfortable with
[12:40:44] <specing> Oh.
[12:40:47] <smeding> then, realise that you communicate with AVR peripherals by writing to certain memory locations, that are defined as macros so they have names
[12:40:49] <smeding> and read an AVR datasheet :)
[12:40:57] <smeding> apart from that, muck about
[12:40:59] <smeding> build things
[12:41:41] <megal0maniac> I've been reading datasheets and mucking about plenty :) Just thought there might be a better way to go about it. I feel like I'm learning from the top down, and therefore missing things
[12:42:21] <smeding> you'll only miss things you don't encounter ;)
[12:42:28] <smeding> if they're important, you'll encounter them
[12:42:40] <smeding> so long as you look at other people's code too
[12:43:15] <molavy> اه
[12:43:15] <molavy> hi
[12:43:15] <smeding> yo
[12:43:23] <molavy> i work on simple project all day
[12:43:41] <molavy> connect a lcd character to atmega32
[12:44:39] <specing> That is no simple project ;P
[12:45:00] <molavy> what is problem of this code
[12:45:01] <molavy> http://www.fpaste.org/6DcQ/
[12:46:31] <molavy> no character appear on lcd
[12:48:16] <megal0maniac> I'm spending most of my time with other people's code :) So no suggestions? Just keep doing what I'm doing?
[12:49:12] <specing> delays, delays everywhere!
[12:49:16] <megal0maniac> And what is a "nop"? (Just looking at that code. Figure it's an assembly instruction of sorts?)
[12:49:26] <specing> megal0maniac: datasheet ;P
[12:49:37] <CapnKernel> It does nothing except consume time and space
[12:49:50] <CapnKernel> Sometimes you need something to consume time and space, and NOP is your opcode
[12:49:52] <specing> Hehe
[12:50:48] <specing> nop is just an alias for eor r0, r0 afaik
[12:54:16] <Tom_itx> lots of those get executed here every day
[12:57:50] <megal0maniac> And to figure out what that means... datasheet? :P
[12:59:01] <molavy> NOP cause error on program? what is problem?
[12:59:29] <Tom_itx> it means it is a waste of time
[13:00:01] <specing> there is no NOP opcode
[13:00:16] <specing> NOP is an alias to a useless version of eor
[13:00:30] <specing> wait
[13:00:34] * specing doublecheks
[13:03:14] <specing> yeah, it actually has its own machine code
[13:03:26] <specing> since EOR affects SREG
[13:03:35] <specing> NOP doesen't
[13:03:42] <specing> NOP is 0x0000
[13:04:12] <specing> EOR's prefix is 0b000001
[13:09:58] <smeding> i don't think anyone said there was a problem with nop
[13:10:01] <megal0maniac> It's a null instruction?
[13:10:03] <smeding> nop does nothing. sometimes you want that
[13:10:36] <smeding> like when you have nothing to do but you need to be doing something
[13:11:13] <Tom_itx> what if you have something to do but don't want to?
[13:11:28] <OndraSter> like if you want to wait one cycle -.-
[13:12:20] <molavy> aha, OK,like delay
[13:13:21] <megal0maniac> Why would you need a delay that small? To give time to the other device to process the instruction?
[13:13:44] <smeding> megal0maniac: because you can make larger delays with a loop ;)
[13:14:00] <smeding> and sometimes you want that kind of granularity
[13:14:15] <molavy> i dont' know why this code don't work?
[13:17:51] <molavy> any idea? that means nop don't have affect on code,but why no character appear on lcd
[13:18:06] <molavy> i changed atemga8 with atmega32
[13:18:13] <molavy> with no success
[13:26:59] <megal0maniac> specing: So that wasn't directed at me? I mean... It's good to know, but kinda out of the blue :P
[13:34:50] <megal0maniac> So if I create a for loop which runs "nop" 16 000 000 times, I should theoretically get a 1s delay on a 16mhz device
[13:35:00] <megal0maniac> But wait! The for loop will use cycles
[13:35:07] <megal0maniac> :/
[13:35:12] <RikusW> longer
[13:35:21] <RikusW> write the loop in asm
[13:35:32] <RikusW> then you can be cycle accurate
[13:35:32] <megal0maniac> Barely figured out C :P
[13:35:47] <OndraSter> asm is easier than C actually :D
[13:35:50] <OndraSter> just.. longer
[13:35:52] <RikusW> avr asm is fairly easy
[13:36:22] <megal0maniac> Any pointers on where to start if I want to code in asm? Same as C? (Just muck about?)
[13:36:24] <specing> molavy: DEBUG IT
[13:39:13] <megal0maniac> But you can call assembly instructions from C... :?
[13:39:20] <RikusW> megal0maniac: http://www.atmel.com/Images/doc0856.pdf
[13:39:21] <specing> yeap
[13:39:28] * megal0maniac shudder
[13:39:34] <megal0maniac> I have this
[13:39:43] <megal0maniac> Most of it still makes no sense
[13:39:44] <RikusW> megal0maniac: also read the avr libc docs on how to mix it with C
[13:39:54] <molavy> specing,i am beginner , how ca i debug it
[13:40:29] <specing> molavy: use jtag, blink leds, use an oscilloscope, use a logic probe
[13:40:30] <RikusW> megal0maniac: read the AVR architecture part in the datasheet too
[13:40:39] <RikusW> it will help you to understand
[13:40:41] <OndraSter> <RikusW> avr asm is fairly easy
[13:40:42] <OndraSter> yes
[13:40:47] <OndraSter> compared to anything like x86
[13:40:53] <OndraSter> x86 asm is absolutely terrible :D
[13:41:09] <RikusW> x86 IS is big....
[13:41:10] <OndraSter> (okay, the basic 8086 stuff is okay, but then it goes very bad)
[13:41:11] <specing> as is any other CISC arch's asm
[13:41:22] <RikusW> agreed ;)
[13:41:31] <OndraSter> hell even ARM is no joy anymore with all the 100000 instructions :/
[13:41:42] <drgreenthumb> heh specing blinky LED debugging I thought I was the only one :)
[13:41:53] <drgreenthumb> it kinda messes with timing sometimes ;pp
[13:41:59] <OndraSter> nah I had even 2x10 bargraphs used for debugging :D
[13:42:10] <specing> drgreenthumb: or code generation
[13:42:15] <RikusW> megal0maniac: PORTB = 0x35; -----> ldi r16,0x35 out PORTB,r16
[13:42:55] <megal0maniac> See, I don't know what PORTB = 0x35 means. I have an idea, but can't say for sure
[13:43:08] <CapnKernel> megal0maniac: Seek help.
[13:43:22] <megal0maniac> In progress :P
[13:43:42] <megal0maniac> The hex is an 8bit representation of the status of each pin on port b
[13:43:45] <CapnKernel> molavy: My advice is to cut down your code until it's the simplest code possible which still demonstrates the problem
[13:43:45] <RikusW> megal0maniac: read the PORTS chapter in the datasheet
[13:43:54] <RikusW> correct
[13:43:57] <megal0maniac> DDR determines whether each pin is an input or output
[13:44:04] <megal0maniac> (Data Direction Register)
[13:44:05] <RikusW> 0 = input
[13:44:11] <RikusW> 1 = output
[13:44:24] <RikusW> and you read from PIN
[13:44:29] <RikusW> NOT from PORT
[13:45:32] <megal0maniac> You set DDR before setting PORT, correct?
[13:45:51] <RikusW> doesn't matter
[13:46:13] <RikusW> when DDR = 0 PORT controls the pullup
[13:47:06] <megal0maniac> Aha.
[13:47:14] * megal0maniac saves chat log
[13:47:23] <megal0maniac> 1 = pulled up
[13:48:26] <RikusW> I actually bitbang using DDR and setting PORT = 0 with external pullup, this way I have open drain output
[13:50:15] <megal0maniac> Why would you do it that way? Is an open collector useful somehow?
[13:50:49] <RikusW> yes
[13:50:54] <Steffanx> nu
[13:51:13] <RikusW> for connecting multiple devices to the same wire, making a small network
[13:52:13] <RikusW> Steffanx: seems you don't like dW anymore ? :-P
[13:52:48] <Steffanx> Why you think so?
[13:53:12] <RikusW> your reply above ;)
[14:02:33] <megal0maniac> Thanks for the help, I'm off to read some datasheets :)
[14:03:21] <izua> dW is horrible
[14:03:39] <izua> and for a more generic one wire thing, maxim rolls its own "one wire" protocol
[14:04:45] <RikusW> izua: I already made the dW specs public ;)
[14:05:15] <izua> i know
[14:05:37] <RikusW> why would the maxim one be better ?
[14:06:17] <izua> oh, it'[s not
[14:06:35] <izua> i thought we were just listing horrible things
[14:06:47] <Steffanx> izua
[14:07:00] * Steffanx continues list :P
[14:07:05] <izua> they even have a binary tree enumeration protocol
[14:07:09] <RikusW> :-D
[14:07:20] <RikusW> what for ?
[14:07:21] <izua> Steffanx: my comeback will be cruel
[14:18:26] <RikusW> dW worked fairly well for me...
[14:22:25] <OndraSter> hmmm in charlieplexing:
[14:22:25] <OndraSter> http://clip2net.com/s/2ayUv
[14:22:28] <OndraSter> when I lit up LED7
[14:22:33] <OndraSter> how come that LED1 and LED3 don'T lit up?
[14:22:34] <OndraSter> don't*
[14:22:41] <OndraSter> just because of small voltage drop on them?
[14:23:14] <smeding> yeah voltage is too low iirc
[14:23:15] <smeding> per LED
[14:24:14] <CapnKernel> Dowp
[14:24:54] <CapnKernel> Note to self: When writing an email to customer, be sure to avoid signing off email with "Retards" instead of "Regards".
[14:25:02] <OndraSter> lol
[14:25:07] <OndraSter> did you sent it that way?
[14:25:26] <RikusW> ouch
[14:25:47] <drgreenthumb> haha oops
[14:31:07] <CapnKernel> No I didn't.
[14:31:15] <CapnKernel> Just occurred to me as a gag, that's all.
[14:31:24] <CapnKernel> I'd be horrified if it really happened.
[14:37:50] <drgreenthumb> http://i.imgur.com/cDRAC.jpg for Steffanx
[14:38:07] <Steffanx> It doesn't work drgreenthumb
[14:38:11] <drgreenthumb> :P
[18:32:58] <SuperMiguel> how can i find out how often i can get data from a sensor?
[18:33:44] <GuShH> datasheet.
[18:33:45] <Jagged> SuperMiguel: datasheet
[18:34:30] <prpplague> datasheet
[18:34:35] <OndraSter> datasheet
[18:34:40] <Landon> sheet of data
[18:34:46] <SuperMiguel> this is the datasheet http://www.crustcrawler.com/motors/RX28/docs/RX28_Manual.pdf
[18:35:14] <SuperMiguel> it justs says Communication Speed 7343bps ~ 1 Mbps
[18:35:50] <GuShH> when the datasheet contains no useful information it is known as a datashit
[18:35:59] <Landon> I would honestly assume you can poll it as much as you want
[18:36:00] <OndraSter> SuperMiguel, well you can read as fast as you can then
[18:36:04] <OndraSter> upto the 1Mbit
[18:36:24] <GuShH> Landon: rise times, etc. so you can't.
[18:36:42] <GuShH> the digital world meets the analog world and your expetations fall to the ground.
[18:36:59] <Landon> GuShH: right, which is why they have the communication speed 7343bps ~ 1 Mbps
[18:36:59] <Jagged> Return Delay Time
[18:36:59] <GuShH> spelling issues aside (cold fingers) that's often one of the many limiting factors.
[18:37:05] <Jagged> is what you want
[18:38:38] <SuperMiguel> i can read torque, speed, and location just not sure how many times i can do that per second
[18:38:53] <SuperMiguel> not sure if my limiting factor if the servo or my controller
[18:38:53] <Jagged> Return Delay Time
[18:39:28] <Jagged> if my skimming is correct, it responds with a status packet... and the return delay time governs the delay on that status packet
[18:40:22] <SuperMiguel> Jagged: mm
[18:41:04] <SuperMiguel> i mean the controller it self wont limit that speed?
[18:41:12] <SuperMiguel> like if i put it on an interupt?
[18:41:44] <Jagged> well... it depends on how fast your uC
[18:41:52] <Jagged> ... how fast your uC is
[18:42:02] <Jagged> I've since closed the datasheet
[18:42:24] <Jagged> but IIRC it had a range of us to 0.5ms
[18:42:25] <SuperMiguel> well im using a 2561
[18:42:59] <SuperMiguel> which i think works at 16 Mhz
[19:02:25] <OndraSter> I do wonder, could one write simple "SPI" downloader for attiny that would fit like 128B? :P
[19:03:55] <Tom_L> do it in asm
[19:04:34] <OndraSter> sure
[19:04:52] <OndraSter> Tom_L, this might be a strange question
[19:04:55] <OndraSter> but are you also Tom_itx? :D
[19:05:16] <OndraSter> just different name for when you have clone of yourself here
[19:08:17] <Tom_L> yes
[19:08:27] <Tom_L> i was working on the itx box
[19:27:38] <OndraSter> sometimes I wish there was a ASM but with C notation :)
[19:28:12] <OndraSter> an-
[19:28:25] <Tom_L> you can use some c like syntax with it
[19:28:33] <OndraSter> like
[19:28:39] <OndraSter> R16 = 0xFE;
[19:28:47] <OndraSter> R16 & 0x13
[19:28:56] <OndraSter> R15:16 << 2
[19:29:03] <OndraSter> R15:R16 << 2*
[19:29:11] <OndraSter> instead:
[19:29:16] <OndraSter> LDI R16, 0xFE
[19:29:22] <OndraSter> ANDI R16, 0x13
[19:29:32] <OndraSter> LSL R15
[19:29:35] <OndraSter> ROL R16
[19:29:53] <Tom_L> ori r16, (1<<WDCE) | (1<<WDE)
[19:30:09] <Tom_L> ldi r16, ((0<<CLKPCE) | (0<<CLKPS3) | (0<<CLKPS2) | (0<<CLKPS1) | (0<<CLKPS0) ) ;
[19:30:36] <OndraSter> R16 = (1 << WDCE) | (1 << WDE)
[19:30:43] <Tom_L> andi r16, (0xff & ~(1<<WDRF))
[19:31:26] <OndraSter> how is that C syntax? :P
[19:31:39] <OndraSter> R16 & (0xFF & ~(1 << WDRF))
[19:31:47] <Tom_L> well it may not be exclusive but it makes it more readable
[19:58:02] <SuperMiguel> how can i create a 7.8ms interrupt ?
[20:00:05] <Tom_itx> timer overflow
[20:00:16] <Tom_itx> preset the timer
[20:00:24] <Tom_itx> is one way
[20:04:04] <SuperMiguel> thats using TIMSK and TCCR ?
[20:25:40] <Tom_itx> i believe so
[20:41:25] <SuperMiguel> how accurate is _delay_ms?
[20:43:53] <drgreenthumb> exactly as accurate as your F_CPU setting
[20:44:11] <drgreenthumb> so probably not very :P
[20:44:17] <Casper> actually
[20:44:24] <Casper> it depend on the delay length
[20:45:09] <Casper> something like F_CPU/252 ms long and it's very precise, over that it's slightly less accurate
[20:46:32] <SuperMiguel> F_CPU/252?
[20:46:35] <SuperMiguel> Casper: what you mean
[20:47:16] <SuperMiguel> define it as 16Mhz/252?
[20:48:14] <Casper> the code is actually in 2 parts... depending on the delay asked
[20:48:40] <Casper> if the delay is bellow F_CPU/252 cycles long, the code is precise
[20:49:01] <Casper> over that it go in a loop, and there is a slight difference, but nothing catastrophic
[20:49:24] <drgreenthumb> _delay_ms is a weird function. I called it once with a variable instead of a literal and it brought a bunch of cruft with it, overflowed my attiny25 :) fixed with a loop.
[20:51:38] <SuperMiguel> Casper: so if im working with a 16 Mhz chip, that /252 is 63 Khz so anything under 3.9ms wont be good?
[20:53:05] <Casper> yes and no
[20:53:13] <Casper> the difference is a few cycles off
[20:54:16] <drgreenthumb> your xtal is probably off by more than that
[20:54:29] <drgreenthumb> actual xtal vs F_CPU I mean.
[20:55:43] <SuperMiguel> whats my best bet to make 6.8 ms delay.. But exactly 6.8ms every time?
[20:57:05] <drgreenthumb> get an RTC
[20:57:36] <Tom_itx> or find a chip that uses rtc input on timer2
[20:57:48] <Casper> SuperMiguel: 6.79999999 isn't precise enought?%
[20:58:02] <SuperMiguel> Casper: thats good
[20:58:36] <Casper> then use _delay_ms(6.8); :D
[20:59:06] <SuperMiguel> and CPU_F 16000000LU?
[21:00:02] <SuperMiguel> well the 2561 has a RTC
[21:00:12] <SuperMiguel> Tom_itx: not sure if its on timer2
[21:00:43] <Casper> rtc usually is 1/32768 of second precise
[21:00:50] <Casper> at best
[21:01:22] <Tom_itx> it may vary
[21:01:42] <SuperMiguel> Casper: isnt that better than _delay?
[21:01:58] <Casper> yes and no
[21:02:17] <Casper> _delay_* is technically 1/F_CPU of second precise
[21:02:23] <Casper> plus or minus a few cycles
[21:02:37] <SuperMiguel> then no
[21:02:58] <SuperMiguel> why u said yes and no??
[21:03:08] <SuperMiguel> it can fail?
[21:03:17] <Casper> _delay_* are affected by interrupts
[21:05:26] <drgreenthumb> RTCs are tuned for real time. that's why they are called "real time clocks" ;p so that 32kHz is very accurate. but it doesn't have the same precision as 16MHz. I think that's the point here.
[21:06:00] <drgreenthumb> but connected as a clock source on an AVR you can probably do some neat tricks, eh?
[21:11:10] <drgreenthumb> if you're building something that accumulates and can drift over time, an RTC is the way to go. If you just want to get pretty darned close (within a few microseconds) then _delay_ms is probably fine.
[21:12:22] <drgreenthumb> what are we talking about here anyway/
[21:12:24] <drgreenthumb> ?
[21:12:31] <drgreenthumb> driving some external IC or something?
[21:14:22] <Kevin`> if you need a minimum time between events, use _delay_{us,ms}. if you want a constant time, use one of the timers
[22:57:15] <SuperMiguel> Casper: Kevin` If i want to use interupts i guess _delay_ms wont work... So i guess i have to use timers, how do i use them? ISR??
[22:59:54] <Casper> SuperMiguel: depend how you want to deal with it
[23:00:00] <Casper> and the precision needed
[23:00:46] <SuperMiguel> Casper: easiest way
[23:00:58] <Casper> same
[23:01:33] <SuperMiguel> same?
[23:03:03] <Casper> yes same
[23:03:22] <Casper> interrupt are a better way, but harder, yet sometime simplify stuff
[23:03:28] <Casper> and allow other part of the code to run
[23:03:39] <Casper> which complicate management
[23:03:47] <Casper> but pooling is wastefull
[23:04:59] <SuperMiguel> well i want to use an interupt to control a servo, and my main to get data from it
[23:05:05] <SuperMiguel> thats why i wanted to use an interrupt
[23:12:14] <SuperMiguel> Casper: http://www.ideone.com/ezF0Y
[23:16:29] <Sefid_Par> Who can take a look at this program that should make 3phase square waves. I want to know if it has any syntax problem or any other. http://www.heypasteit.com/clip/0FCJ
[23:17:55] <Casper> I see one big problem
[23:18:03] <Sefid_Par> What is it?
[23:18:07] <Casper> lack of proper comments
[23:18:46] <Sefid_Par> For example, Where should be commented more proper?
[23:19:15] <Casper> also, your define for rectangle... be sure that it do the right math
[23:19:33] <Casper> people tend to forget the mathematical priority of operations
[23:20:41] <Sefid_Par> Casper: Ok, I add parantheses to it.
[23:33:21] <SuperMiguel> Casper: on that code i linked my delay is not working as it should because there is an interrupt right?
[23:33:53] <Casper> the interrupt pause the other code, including the delays
[23:34:33] <SuperMiguel> Casper: so how do i have a delay and a interrupt running at same time?
[23:34:35] <SuperMiguel> cant?
[23:35:01] <Casper> use timers for your delay, or stop the interrupts before your delay...
[23:37:13] <SuperMiguel> Casper: so my interupt is using timer0, how can i use a timer with out an interupt?
[23:37:25] <Casper> pool it
[23:37:39] <Casper> and be sure your interrupts are short
[23:39:01] <Sefid_Par> How can I write a binary number? :|
[23:39:17] <Sefid_Par> in C?
[23:39:57] <Sefid_Par> I've searched the google. I saw this pattern: 0b0001001 for example. Is it true?
[23:40:55] <Casper> depend on the compiler
[23:41:00] <Casper> usually you use hex
[23:41:35] <Sefid_Par> Casper: Ok; Thanks.
[23:41:49] <drgreenthumb> or shift left
[23:42:20] <Microboter> it works in studio 6
[23:46:03] <Sefid_Par> Microboter: Which one? 0b00010?
[23:46:53] <Microboter> ie DDRB = (0b00001111); works
[23:48:37] <Microboter> if you need to set a single bit the common way is DDRB = (1<<5); that will set the 5th bit to 1
[23:48:48] <Microboter> humm almost
[23:49:21] <Microboter> DDRB |= (1<<5) forgot the |
[23:49:37] <drgreenthumb> yeah or instead of the 5 there, use a macro ;) PIN5 or something.
[23:49:50] <drgreenthumb> or whatever register bit you're fiddling.
[23:52:44] <Sefid_Par> Ok, Thanks. Of course I can understand shifts. :)
[23:54:28] <Sefid_Par> Casper: I made some changes to the program and commented. Whould you mind take another look? http://www.heypasteit.com/clip/0FCK
[23:54:49] <Casper> man no wonder why those charger were cooking SLA...
[23:55:03] <Casper> the charge algo is more suited for flooded than SLA...
[23:55:25] <Casper> 14.75V...
[23:55:51] <Casper> I hasn't checked if it just hit the voltage then go to standby, or what... but... wow.. 14.75...
[23:56:09] <Sefid_Par> Casper: Excuse me. I can not understand!