#robotics Logs

Dec 25 2011

#robotics Calendar


03:54 rue_shop I fixed my only variable power supply
03:55 rue_shop oh its almost 2am
03:56 rue_shop wow
03:56 rue_shop almost time to get the broom and free clause from the furnace exhaust again
03:56 e_shop stret
04:15 rue_shop what do I need from my robots
04:15 rue_shop well, honestly, I need entertainment
04:15 rue_shop I need a robot I can set loose on an unsuspecting world and get a laugh from
04:17 rue_shop I suppose I could also use robots to take up some of the choars
04:17 rue_shop such as fixing the robots
05:30 rue_house wow, its almost 3:30am, nowonder I never get anything done
07:35 saschi hello
07:37 rue_bed hey
07:37 rue_bed !time
07:38 rue_bed !time
07:38 tobbor My watch says its 05:32 Sun Dec 25 2011
07:39 saschi kinda early in the morning :)
07:51 Steffanx My watch… tobbor get a better watch
11:55 e_bed stret
11:58 Tom_itx i wish you knew more about pcint0 so you could enlighten me
11:59 Tom_itx i tried looking for app notes on atmel but no luck
11:59 Tom_itx avrfreaks had a thread indicating there could be more than one pin at once causing the interrupt to fire
12:02 Tom_itx it might be useful for making a quadrature encoder
13:02 rue_bed oh hi
13:02 rue_bed yes, pin change interrupt is great for encoders
13:02 Tom_itx rise and shine
13:02 rue_bed heck no
13:02 rue_bed how are the kids/tree?
13:02 rue_bed busy?
13:02 Tom_itx yeah
13:03 rue_bed not everyone got an avr for christmas right?
13:03 Tom_itx no
13:03 Tom_itx they should though
13:04 rue_bed somoen phoned me this morning, hope they left a message
13:04 rue_bed hmm, its 11
13:04 Tom_itx wasn't me
13:04 rue_bed better get up beofre lunchtime
13:05 Tom_itx goin to ma's ?
13:05 rue_bed I got down out of bed just in time to miss hte cal
13:05 rue_bed na, I'm here this year
13:06 Tom_itx when you get a usb stick why do they insist on filling it with their crap?
13:06 rue_bed wow, i was up to like 4
13:06 rue_bed cuase its free
13:06 rue_bed if it were a linux stick... na it'd come with a linux install image
13:08 Tom_itx seems pcint can be triggered by more than one event at the same time
13:08 Tom_itx likely would never happen
13:10 Tom_itx have you written quadrature code using it?
13:14 rue_bed pin changes mean pins going high or low
13:15 rue_bed so if a bunch of bits change they all trigger change interrupts
13:15 rue_bed meaning you only need 1 port wiht pin change interrupt to fully service 4 encoders
13:16 rue_bed did they put hte interrupt on the whole port or just 1 pin?
13:16 rue_bed iirc the tiny45 has pin change interrupt on every pin
13:19 rue_house I'm gonna have a shower, which avr?
13:22 Tom_itx the whole port
13:22 Tom_itx any of the 48..328
13:22 Tom_itx pcint0..2
13:23 Tom_itx that would spend alot of time in the interrupt if it serviced 4
14:00 rue_house it dosn't take long to deal with them, maybe 10 instructions a peice
14:00 rue_house ok, atmega48
14:01 rue_house huh, I dont have the datasheet for hte 48
14:03 rue_house hmm
14:03 rue_house source url again?
14:05 Tom_itx just a sec
14:06 Tom_itx <Tom_itx> http://tom-itx.dyndns.org:81/~webpage/rue/pcint0.c
14:06 Tom_itx i haven't tried that version
14:07 Tom_itx the PORTD ^= 0x01; inside the int worked though
14:08 Tom_itx the pcint1_vect is not being used right now
14:12 rue_house oops lunchtime, I have to put down the rest of this cake and make lunch
14:13 rue_house do you have this on an encoder?
14:18 rue_house do you have an encoder set up on it now?
14:18 rue_house can you set up 8 leds on a port?
14:30 Tom_itx none of the above
14:30 Tom_itx i can do 2 leds
14:30 rue_house your ON!
14:30 Tom_itx but i'm gonna be leaving in a bit here
14:31 rue_house gee christmas day?
14:31 Tom_itx did that int code look ok?
14:31 rue_house what could you possibly have to do?
14:31 Tom_itx not much
14:31 rue_house no I'm completely rewriting it
14:31 Tom_itx just goin to my sisters
14:31 Tom_itx i figured
14:31 Tom_itx just can't leave well enough alone
14:32 Tom_itx that was just code i was fiddling with
14:32 Tom_itx no real purpose
14:34 rue_house something is odd here
14:34 rue_house they have pin change for every port, but ther are only 3 interrupt vectors
14:35 Tom_itx yes
14:35 rue_house so there is either mapping or each interrupt is for a different port
14:35 Tom_itx fwiw, this is a 168
14:35 Tom_itx each for a different port
14:35 Tom_itx ~P.74
14:36 Tom_itx or so
14:36 Tom_itx in the 328 pdf
14:36 Tom_itx has em all
14:36 Tom_itx 48...328
14:36 Tom_itx ok i dug out an encoder
14:36 rue_house ah
14:36 Tom_itx it may need pullups
14:36 rue_house PCMSK0
14:37 Tom_itx yes
14:37 Tom_itx then you activate the pins you want on each port
14:38 Tom_itx PCICR enables pcint0..2
14:39 Tom_itx the other one enables the individual pins
14:39 Tom_itx so i just enabled 2 for now
14:41 rue_house almost done
14:41 Tom_itx change the int to & instead of ^ to see if it's set or not
14:41 Tom_itx i wasn't concerned about it
14:43 rue_house ok I think this will work
14:44 rue_house http://ideone.com/sa194
14:50 m_L snickers at rue's sign
14:52 Tom_L it's in the interrupt.h already
14:55 Tom_L change the else if from X to x
14:55 rue_shop oos
14:56 Tom_L u didn't compile it
14:56 Tom_L you cut n pasted functions from your quad code
15:03 Tom_L i'll wire up an encoder when we get back
15:03 Tom_L i may move it to pcint19..20 for simplicity of wiring
15:49 rue_house http://ideone.com/1spcI <-- with corrections
20:21 Tom_itx tested?
21:22 rue_house hack no I have have a mega 4-whatever
21:24 Tom_itx ok these need pullups
21:24 Tom_itx 1k?
21:24 Tom_itx open collector
21:24 Tom_itx wait.. i think i put 10k pullups on the port pins already
21:24 Tom_itx that should suffice
21:30 rue_house yup
23:07 Tobias| Not sure if this is the ideal channel to ask, but does anybody know of anything similar to the google AI challenge that I can play around with?
23:09 rue_house I know of it, but I dont know any more
23:09 rue_house you can talk about ai here, its part of robotics
23:09 Kimlaroux did you ask in #ai?
23:14 Triffid_Hunter Tobias|: http://aichallenge.org/ <-- is this the google one or antoher one?
23:22 Tobias| That's the google one
23:23 Tobias| I didn't, Kimlaroux