I am attempting to write some code to interface with one of there modules,
Unfortunately I cant do any testing due to the fact they wont be in stock until May.
If some of you use these please let me know if I am on the right track.
@ DEVICE PIC16F877A,XT_OSC
include "modedefs.bas"
define CHAR_PACING 100
define OSC 20
DEFINE debug_mode 0 ' Debug sending True serial data
DEFINE debug_reg portc ' Debug Port = PortC
DEFINE debug_bit 6 ' Debug.bit = PortC.6
DEFINE debug_baud 9600 ' Default baud rate = 9600
DEFINE osc 20 ' We're using a 20 MHz oscillator
DEFINE ADC_BITS 8 ' Set A/D for 8-bit operation
DEFINE ADC_CLOCK 3 ' Set A/D clock r/c
DEFINE ADC_SAMPLEUS 50 ' Set A/D sampling time @ 50 uS
Define LCD_DREG PORTD ' Define LCD pins
Define LCD_DBIT 4 'use upper 4 bits d4-d7
Define LCD_RSREG PORTD
Define LCD_RSBIT 2
Define LCD_EREG PORTD
Define LCD_EBIT 3
DEFINE LCD_LINES 2
Define LCD_COMMANDUS 2000 ' Command Delay (uS)
Define LCD_DATAUS 50 ' Data Delay (uS)
start:
toggle portc.3
serout portc.5,N9600,[13,13] 'send init autobaud string
serout portc.5,N9600,["ow",13] 'open file for writing
serout portc.5,N9600,["w","This is a test",13] 'write this is a test to sd
serout portc.5,N9600,["q",13] 'close file
pause 1000
goto start
Bookmarks