blueroomelectronics
Well-Known Member
Well I'm stuck on what to call the program? Here's the core program, it calls a module that contains the code for different sensors such as CDS, Solar, DS1820, thermistor, etc... and displays the result to be captured by the UART tool (part of PICkit2 2.x software) and since the UART tool supports capture you could use it as a data logger. Great for a science fair project.
Future revisions may contain EEPROM or Flash logging, multiple sensor logging etc. I'll post a typical module in the next day or two.
Swordfish BASIC
The Data = "Test " is only for testing purposes (the program will run as shown, just turn on DIP-4 (TX) after programming. The not shown module will transmit actual sensor data.
Future revisions may contain EEPROM or Flash logging, multiple sensor logging etc. I'll post a typical module in the next day or two.
Swordfish BASIC
Code:
Device = 18F1320
Clock = 4 ' define the clock speed for the compiler
Config OSC = INTIO2, WDT = OFF, LVP = OFF
Dim Data As String
Include "USART.bas"
SetBaudrate(br9600)
OSCCON = $62 ' 4MHz OSC
Data = "Test "
USART.Write("1 Second Recorder",13,10)
While true
' call module CDS, Solar, DS1820, thermistor, etc...
' returns a string "Data"
USART.Write(Data)
DelayMS(1000)
Wend
End