Ga-Retired
New Member
Hi all,while getting to understand the Max7219 a little better and lots of different combinations of programmingI've settled on,at least for me, the program format presented by forum member" Westaust55".I've also included sections of my program from "Marks" for his magic math solutions I'm trying to use with the DS18B20 temperature sensor in my latest project.
Now to my problem which I've spent much time trying to resolve on my own and now must turn to the "experts' for help.Using the 4 digit CC led display with has been proven to 'work like a champ' with Westaust55 decimal counter using a 08m2,I now want to use the led display for a temperature readout with .1 degree resolution using Marks code snippet.
SYMBOL Ds18b20 = C.1
SYMBOL Temperature = W0 SYMBOL whole_degrees = b1 SYMBOL decimal_degrees = b0
Main:
Readtemp12 Ds18b20,Temperature
Convert:
Temperature = Temperature +880 *9 /5 - 1072 *16 'Fahrenheit (0.0F to 255.9F)
decimal_degrees = decimal_degrees **2560 ' (0.1)resolutuion
SERTXD (CR, LF, "Temperature ",#whole_degrees,".",#decimal_degrees," Degrees F", CR, LF)
PAUSE 1000
GOTO Main
To be to the point,all variables are set up,test mode works fine and DP =128 set to .1 resolution.So the problem I'm incuring is getting the proper numbers to be displayed on the readout in the proper format like:" 109.2 " in degrees F.I'm also using blanking on the leading zero's so will want something like' 89.6 ' degrees F. What I'm using now is : Units,Tens,Hundr,and Thous (which is defined in Symbol).
Units =Units //10
Tens =Tens /10
Hundr =Hundr /10//10
Thous = thous /10/10/10
Sertxd is reading out just like I expected,just can't get the correct value to the display.i appreciate all your suggestions and help and maybe I can,once and for all, complete this project and move to the next idea I want to use the Picaxe on.I realize there may be many questions about setup,code ect,ect but It seems I just don't have the right code in place to display the numbers correctly.
Thanks everyone,my best,Ga-Retired
Now to my problem which I've spent much time trying to resolve on my own and now must turn to the "experts' for help.Using the 4 digit CC led display with has been proven to 'work like a champ' with Westaust55 decimal counter using a 08m2,I now want to use the led display for a temperature readout with .1 degree resolution using Marks code snippet.
SYMBOL Ds18b20 = C.1
SYMBOL Temperature = W0 SYMBOL whole_degrees = b1 SYMBOL decimal_degrees = b0
Main:
Readtemp12 Ds18b20,Temperature
Convert:
Temperature = Temperature +880 *9 /5 - 1072 *16 'Fahrenheit (0.0F to 255.9F)
decimal_degrees = decimal_degrees **2560 ' (0.1)resolutuion
SERTXD (CR, LF, "Temperature ",#whole_degrees,".",#decimal_degrees," Degrees F", CR, LF)
PAUSE 1000
GOTO Main
To be to the point,all variables are set up,test mode works fine and DP =128 set to .1 resolution.So the problem I'm incuring is getting the proper numbers to be displayed on the readout in the proper format like:" 109.2 " in degrees F.I'm also using blanking on the leading zero's so will want something like' 89.6 ' degrees F. What I'm using now is : Units,Tens,Hundr,and Thous (which is defined in Symbol).
Units =Units //10
Tens =Tens /10
Hundr =Hundr /10//10
Thous = thous /10/10/10
Sertxd is reading out just like I expected,just can't get the correct value to the display.i appreciate all your suggestions and help and maybe I can,once and for all, complete this project and move to the next idea I want to use the Picaxe on.I realize there may be many questions about setup,code ect,ect but It seems I just don't have the right code in place to display the numbers correctly.
Thanks everyone,my best,Ga-Retired