Hi all,
Im making a nice project where I need to monitor the temperature of a heatsink as well as the RPM of the attached fan.
All data is displayed on a 4D systems uLCD43-PT
To measure the RPM I have made a simple frequency counter and it works really well. The temperature sensor also works very well.
The only problem is that I cannot have RPM measurement and Temperature measurement enabled add the same time, if they are then the RPM value jumps all over the place and the gettemp value of the DS1820 macro contains 4095.
I have made a small video to show what the problem is.
[/youtube]
I hope somebody has a suggestion on how to solve this problem
Problem with TIMER0 and 1-Wire bus
Moderator: Benj
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Problem with TIMER0 and 1-Wire bus
- Attachments
-
- Flowcode1.fcfx
- (47.97 KiB) Downloaded 261 times
the will to learn, should not be stopped by any price
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Problem with TIMER0 and 1-Wire bus
Hi Jordy,
Sounds like a great project.
I would disable your interrupts while you are talking to the 1 wire device to ensure that the comms works correctly without being interrupted mid flow.
e.g.
enable interrupts
wait for a while to collect enough data, maybe update the display while you are waiting here.
disable interrupts
communicate with 1 wire device and collect temp data
return to start
Sounds like a great project.
I would disable your interrupts while you are talking to the 1 wire device to ensure that the comms works correctly without being interrupted mid flow.
e.g.
enable interrupts
wait for a while to collect enough data, maybe update the display while you are waiting here.
disable interrupts
communicate with 1 wire device and collect temp data
return to start
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
- Jordy101091
- Posts: 519
- Joined: Sat Jan 08, 2011 4:02 pm
- Location: The Netherlands
- Has thanked: 25 times
- Been thanked: 188 times
- Contact:
Re: Problem with TIMER0 and 1-Wire bus
OK I Will have a go with this,
And let you how it works out.
Regards jordy
And let you how it works out.
Regards jordy
the will to learn, should not be stopped by any price