Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $regfile = "m8def.dat"
- $crystal = 8000000
- $hwstack = 40
- $swstack = 16
- $framesize = 32
- Config Lcdpin = Pin , Db4 = Portc.2 , Db5 = Portc.3 , Db6 = Portc.4 , Db7 = Portb.1 , E = Portc.1 , Rs = Portc.0
- Config Lcd = 16 * 2
- Config Adc = Single , Prescaler = Auto , Reference = Avcc
- Start Adc
- Dim Temp As Integer
- Dim Converted As Single
- Dim Text As String * 10
- Do
- Temp = Getadc(5)
- Converted = Temp * 4.2
- Converted = Converted / 1024
- Converted = Converted - 0.5
- Converted = Converted * 100
- Text = Fusing(converted , "#.##")
- Cls
- Lcd Text
- Wait 1
- Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement