Search found 40 matches

by rradojko
Wed Feb 06, 2013 1:37 pm
Forum: General Programming
Topic: Watchdog and Atmega2560
Replies: 4
Views: 4493

Re: Watchdog and Atmega2560

Hello dazz! Thank you very much for the answer. I tested the code on AVR atmega32... wdt_enable(WDTO_2S); This code works, very good :D ... Also code for the reset WD works... wdt_reset(); Thanks dazz again for the information. I have another question. I use procesr ATmega2560 (http://www.atmel.com/...
by rradojko
Sat Feb 02, 2013 1:25 pm
Forum: General Programming
Topic: Watchdog and Atmega2560
Replies: 4
Views: 4493

Watchdog and Atmega2560

Hello!

Using ATmega2560 processor.
How to use a watchdog?

Enable watchdog

Code: Select all

MCUSR = 0x08;
Is that right?

Disable watchdog

Code: Select all

wdt_disable();
Is that right?

Reset watch dog

Code: Select all

wdt_reset();
Is that right?

I wonder whether the commands are correct for the watchdog?

Thanks for the reply.
by rradojko
Fri Feb 01, 2013 1:39 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello. It's me again :wink: . Compiled program for reading DHT11, but does not work. I used atmega32 and 10MHz Quartz. I changed the value of TCNT0 = 0xE0. Prescaler 1:64. The program is written in Flowcode4 DHT11 sensor is purchased http://www.ebay.com/itm/370691456827?ssPageName=STRK:MEWNX:IT&_trk...
by rradojko
Tue Dec 11, 2012 10:57 am
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Thank you very much. Very good explanation.

I understand now.

Good luck!

RR
by rradojko
Tue Dec 11, 2012 10:14 am
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello.

Sorry for the bad question.

I do not understand how to calculate the value TMR0 is 204.8 us.

204.8 us how to get this value?
Thanks.

RR
by rradojko
Sun Dec 09, 2012 6:50 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello Enamul. Thank you very much for the information. Very nicely explained. I understand: 1/20000000Hz = 0,00000005s = 0,05us. One cycle takes 0,05us. I do not understand: How to get value TMR0 is 204.8 us??? Can you explain that? I understand: 204.8/(0.05 * 64)=64..so 64 increment should cause ov...
by rradojko
Fri Dec 07, 2012 5:03 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello Enamul. Thank you very much for the optimization Flowcode4 AVR for DHT11. Sorry, but program does not work. Using DHT22 sensor. DHT11 works the same as DHT22. I think the problem in ATMEGA32. The maximum frequency is 16MHz for atmega32. On the atmega32 is necessary to reduce the frequency. Ena...
by rradojko
Tue Dec 04, 2012 9:37 pm
Forum: General Programming
Topic: 2 X 1Wire individual pin on one mikokontroler
Replies: 12
Views: 7637

Re: 2 X 1Wire individual pin on one mikokontroler

Hello. I used the attached file PIC_One_Wire.c. When translated into HEX code return error. Attach PIC_One_Wire.c C code from Flowcode4. Code works, but I can use only 1 x 1Wire pin. Beny, or you can check the attached code? Your attached code is not working correct. Benj, can you please stick also ...
by rradojko
Tue Dec 04, 2012 8:52 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello.

Thank you for answer.

I attach the program for DHT11 Flowcode4 for AVR ATMEGA32. It is necessary to set TMR0.
Please see, if everything is OK.

RR
by rradojko
Tue Dec 04, 2012 6:57 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello. Thanks for the information. I write code for AVR ATMEGA32. I have a problem with sharing frequency. I can not share the frequency 20MHz clock with 1:4. The figure below What should I do? One more question. My mistake, picture number 12 and 13 is OK. I have a question for Figure 10, calculatio...
by rradojko
Mon Dec 03, 2012 9:39 pm
Forum: General Programming
Topic: Measurement of temperature and relative humidity using DHT11
Replies: 90
Views: 84819

Re: Measurement of temperature and relative humidity using D

Hello, Please have a little help.I have some questions. Picture 8 - function calculation can not see everything. Picture number 12 and 13 can not see everything. Picture 7, C code... is so OK st_bit(intcon, TMR0|E); tmr0=0x00; I would have to window variables. Thank you. rr
by rradojko
Fri Nov 30, 2012 6:34 am
Forum: General Programming
Topic: 2 X 1Wire individual pin on one mikokontroler
Replies: 12
Views: 7637

Re: 2 X 1Wire individual pin on one mikokontroler

Thanks for answer.

The problem is Flowcode4 It allows only one component 1wire.

rr
by rradojko
Thu Nov 29, 2012 5:37 pm
Forum: General Programming
Topic: 2 X 1Wire individual pin on one mikokontroler
Replies: 12
Views: 7637

Re: 2 X 1Wire individual pin on one mikokontroler

If I DS18S20 the individual pin then you can skip address and reading code.
But flowcode but allows only one 1wire one pin.
Use the C code in the project, do not know how.

Any suggestions…

rr
by rradojko
Tue Nov 27, 2012 7:38 pm
Forum: General Programming
Topic: 2 X 1Wire individual pin on one mikokontroler
Replies: 12
Views: 7637

Re: 2 X 1Wire individual pin on one mikokontroler

Sorry for bad english
I understand that it can be 1wire pin connected more DS18S20.
But it's complicated for me. I would like to skip addressing
I would like to connect DS18S20 on each individual pin.
This connection is much more understand for me.

Any other a suggestion?

rr
by rradojko
Tue Nov 27, 2012 1:32 pm
Forum: General Programming
Topic: 2 X 1Wire individual pin on one mikokontroler
Replies: 12
Views: 7637

2 X 1Wire individual pin on one mikokontroler

Hello to everybody.

I'm new to the forum.
I have one question. It is possible to the microcontroller ATmega32 create 2 X 1Wire the pin PB0 and PB1?
How to define two input 1Wire?
To better understand the attach picture.

Thank you very much for the answer.

Radojko