Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Assembly Help - Temp sensor LED on/off

Status
Not open for further replies.

Spadez

New Member
Hi,

This is the code I have for my circuit below. This isnt my code I found it off google but I forget where.

**broken link removed**

Currently I can view the temperature via hexidecimal in MPLAB using the TEMP_LSB.

Im now hoping to make a decision using the temperature. An example would be, if the temperature is above 25 degrees, then turn LED on.

Can someone give me a little guidance, as im new to ASM and wouldnt know where to start this.

Thank you.
 
It looks like the asm file has communication routines for DALLAS ds18x20 type sensor.

You say your new to asm... I would highly recomend against jumping into assembly with this type of project.
It is pretty complex, so to speak.
I just finished a project using this sensor and it took me more than a few months.
But I wont say do have a go.
This may help.. Jake's Electronics | Project - Digital Temperature Sensor Basic

Also I recomend reading and re reading the DS18B20 datasheet and get to understand how it works/communicates.

Also, post a schematic of your circuit. This will help people trying to help you.
 
Hi,

A few pointers might help here.

If you are new to assember, then look at the Sticky at the top of this forum and find one of the Assembler tutorials - that should really help.
The was created by a current member of this forum so help is always available here.

Regarding the ds1820 code, first do not change anything in its core code as the ds1820s routine is very timing critical.
There have been a few ds1820 sensors around, the current one is the ds18B20 which will convert up to 12 bits - I believe it will not run on your old 9 bit ds1820 code.

To give you some idea of how you can add in a led routine I have added on a bit of code at the end - have not 'run' it as such - its just to give you some idea of how its done.
 

Attachments

  • ds1820.asm
    6.5 KB · Views: 184
Status
Not open for further replies.

Latest threads

Back
Top