BasicMicroUK - Forums

www.basicmicro.co.uk
It is currently Tue Oct 23, 2018 12:40 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: old MBasic examle files
PostPosted: Sat Apr 02, 2011 7:08 pm 
Offline
New User

Joined: Sat Apr 02, 2011 5:26 pm
Posts: 1
I still use MBasic pro and I was looking for the old example files. I am trying to connect a ds1620 temp controller ic to a pic and remember there was an example of the code there but there no longer exists the page. Is there an archive somewhere for the old files?


Top
 Profile  
 
 Post subject: Re: old MBasic examle files
PostPosted: Mon Apr 04, 2011 8:40 pm 
Offline
Site Admin
User avatar

Joined: Thu Mar 01, 2001 7:00 pm
Posts: 1316
Location: Temecula, CA
Looks like the code was for a DS1820. Maybe it will help though. Here is the code:

Code:
CPU = 16F876

MHZ = 10

CONFIG 16254



;***********************************************

; http://www.basicmicro.com                   

; Title : owin.bas                             

; Author : Dale Kubin                         

; Date : 04/29/02                             

; One Wire commands. Read a Dallas one wire

; DS1820 chip. Use the float command to handle the

; decimal point.                               

;***********************************************





temp   var word

temp1   var word

Convert   var long

counter var byte



main

   Owout B0,1,main,[$cc,$44]

   

Wait

owin B0,0,[temp]

   if temp = 0 then wait

      Owout B0,1,main,[$cc,$be]

      owin B0,0,[temp.byte0,temp.byte1]

      Convert = float temp fdiv 2.0

Debug ["Temperature = ",real convert," C",13]

goto main

_________________
Tech Support
Basic Micro - Robotic Technology Evolved


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

phpBB SEO