#avr | Logs for 2014-07-08

Back
[05:22:57] <thekindlyone1> on an atmega32 , how do I stop the timer 1? and how do I start it again? TCCR1B=0 for stopping and TCCR1B |= 1<<CS10; for starting again at F_CPU?
[05:23:11] <thekindlyone1> is that right?
[09:31:11] <Casper> thekindlyone1: I don't have the datasheet on hand, but stop and start the clock source select none or whatever is your clock source)
[13:55:12] <bvl> Hi, I was just wondering the Link Register in an AVR 32UC3C controller, what is it used for?
[14:12:13] <bvl> Hi, I was just wondering the Link Register in an AVR 32UC3C controller, what is it used for?
[16:41:48] <cyber37> Hi guy's i have a question, i need to drive 3 leds in PWM with my Atmega, but i can't use the oc pin's because they are on the SPI interface and i use that for communicate with a ENC28j60 (ethernet board), so i was watching for implement my own PWM (it's not difficult to do) but .. in my main function, my While(1){} is blocking inside (because i use a function who "wait for a TCP packet"
[16:42:08] <cyber37> So is it possible with an avr to have multi threads ?
[16:42:42] <cyber37> if yes i must put my "homemade pwm" in another thread
[16:55:59] <timemage> cyber37, which mega?
[16:57:01] <cyber37> done i resolved my problem, by making the function "non blocking"
[16:57:43] <cyber37> Now the PWM is working "when there is no packets", and when "packets arrive" pwm is "stoped" so, but it's not a problem for me
[16:58:57] <cyber37> it was atmega8
[16:59:47] <cyber37> actualy it's working fine so, my android app can drive the led with TCP packets, All good,
[16:59:50] <cyber37> Thanks
[20:35:32] <wondiws> hi, I have this Keypad + LCD shield from DFRobot for the Arduino. Now I am not using the Arduino software, I use the avr-gcc compiler directly.
[20:35:57] <wondiws> I want to use the keypad of this board
[20:36:22] <wondiws> this keypad "muxes" the few buttons onto a single analog signal
[20:36:49] <wondiws> now which ADC mode is best suited you think for reading the buttons?
[20:36:58] <wondiws> the AVR has 4 ADC modes, right?
[22:31:36] <Casper> wondiws: most likelly: none
[22:31:56] <Casper> are you really sure that it is an analog output?
[22:32:04] <Casper> usually it's digital...
[22:32:10] <Casper> but some are indeed analog
[22:32:26] <Casper> in that case, any of the mode is fine, as long as you can read the value of the ADC
[22:35:46] <wondiws> yes, it's analog, they put about 5 buttons on 1 pin
[22:36:10] <wondiws> I think i'll go with free running mode
[22:37:01] <wondiws> when I wake up today :p
[22:37:28] <wondiws> never thought I'd say that last line :p
[22:38:58] <Casper> free running is good