Problem with TIMER0 and 1-Wire bus

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
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

Post by Jordy101091 »

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
Attachments
Flowcode1.fcfx
(47.97 KiB) Downloaded 261 times
the will to learn, should not be stopped by any price

User avatar
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

Post by Benj »

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

User avatar
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

Post by Jordy101091 »

OK I Will have a go with this,
And let you how it works out.

Regards jordy
the will to learn, should not be stopped by any price

Post Reply