Who can help me checking my Programming
'My programming running is like that.....i want my programming every 5second send out the data to bluetooth module and using the bluetooth transmitter to Receiver on PC bluetooth and also show the value on LCD.....so below is my programming i dunno correct or not hope same one can help me checking it and let me knw where i wrong it urgent...!
************************************************** **************
'* Name : WIRELESS TEMP MONITORING SYSTEM.BAS *
'* Author : [select VIEW...EDITOR OPTIONS] *
'* Notice : Copyright (c) 2008 [select VIEW...EDITOR OPTIONS] *
'* : All Rights Reserved *
'* Date : 1/9/2008 *
'* Version : 1.0 *
'* Notes : *
'* : *
'************************************************* ***************
include"modedefs.bas"
DEFINE LCD_DREG PORTB
DEFINE LCD_DBIT 4
DEFINE LCD_RSREG PORTB
DEFINE LCD_RSBIT 0
DEFINE LCD_EREG PORTB
DEFINE LCD_EBIT 1
DEFINE LCD_BITS 4
DEFINE LCD_LINES 2
DEFINE LCD_COMMANDUS 2000
DEFINE LCD_DATAUS 50
DEFINE OSC 4
DEFINE ADC_BITS 8
DEFINE ADC_CLOCK 3
DEFINE ADC_SAMPLEUS 50
DEFINE debug_mode 1
DEFINE debug_reg portc
DEFINE debug_bit 6
DEFINE debug_baud 2400
pause 2000
LCDOUT 254,1,2,2,2,"WELCOME MY"
LCDOUT 254,192,2,"MONITOR SYSTEM"
pause 3000
LCDOUT 254,1,16,2,"MY STARTING"
LCDOUT 254,192,2,"TEMP IS: "
TRISA=255
TRISC.6=0
TRISD=0
TRISA.0=1
B0 VAR BYTE
baud con N2400
MAIN:
ADCON1=3
ADCIN 0,B0
if b0=0 then OUTT
IF B0=10 THEN OUT
IF B0=20 THEN OUT1
IF B0=30 THEN OUT2
IF B0=41 THEN OUT3
IF B0=51 THEN OUT4
IF B0=61 THEN OUT5
IF B0=71 THEN OUT6
IF B0=81 THEN OUT7
IF B0=92 THEN OUT8
IF B0=102 THEN OUT9
IF B0=112 THEN OUT10
IF B0=122 THEN OUT11
GOTO MAIN
OUTT:
LCDOUT 254,201,2,"<0'C"
SEROUT PORTC.6,baud, [#B0=0]
pause 1000
GOTO MAIN
OUT:
LCDOUT 254,201,2,"10'C "
SEROUT PORTC.6,BAUD, [#B0=10]
pause 1000
GOTO MAIN
OUT1:
LCDOUT 254,201,2,"20'C "
SEROUT PORTC.6,BAUD, [#B0=20]
pause 1000
GOTO MAIN
OUT2:
LCDOUT 254,201,2,"30'C "
SEROUT PORTC.6,BAUD, [#B0=30]
pause 1000
GOTO MAIN
OUT3:
LCDOUT 254,201,2,"40'C "
SEROUT PORTC.6,BAUD, [#b0=41]
pause 1000
GOTO MAIN
OUT4:
LCDOUT 254,201,2,"50'C "
SEROUT PORTC.6,BAUD, [#b0=51]
PAUSE 1000
GOTO MAIN
OUT5:
LCDOUT 254,201,2,"60'C "
SEROUT PORTC.6,BAUD, [#b0=61]
pause 1000
GOTO MAIN
OUT6:
LCDOUT 254,201,2,"70'C "
SEROUT PORTC.6,BAUD, [#b0=71]
pause 1000
GOTO MAIN
OUT7:
LCDOUT 254,201,2,"80'C "
SEROUT PORTC.6,BAUD, [#b0=81]
pause 1000
GOTO MAIN
OUT8:
LCDOUT 254,201,2,"90'C "
SEROUT PORTC.6,BAUD, [#b0=92]
pause 1000
GOTO MAIN
OUT9:
LCDOUT 254,201,2,"100'C "
SEROUT PORTC.6,BAUD, [#b0=102]
pause 1000
GOTO MAIN
OUT10:
LCDOUT 254,201,"110'C "
SEROUT PORTC.6,BAUD, [#b0=112]
pause 1000
GOTO MAIN
OUT11:
LCDOUT 254,201,"120'C "
SEROUT PORTC.6,BAUD, [#b0=122]
pause 1000
GOTO MAIN
END
Dude! Take a chill pill! Better yet a sabbatical...
Quote:
Originally Posted by
skimask
Holy crap...
I've got loads of patience, LOADS I tell ya, hours and hours of it, sitting around waiting to be used...
But, again, holy crap, when the answer, or at least a fairly decent chunk of an answer is sitting right there...RIGHT THERE in front of a person...I mean, jeez, how much more prompting does a person need to get off their rear end and try to figure something out.
I'm probably not the only one that hesitates asking a simple question for fear of getting a verbal lashing for reading and not understanding the information provided either in responses or the data sheets. Or having to have our project pre-approved by you before making a suggestion. In my searches to my questions through out this forum, to keep from "bothering the experts", I found that one thing is evident, it's not the year 2004 when there seemed to be an eagerness to "help" upcoming PBP users. Your definition of patience is warped and unfortunately it seems to me that some of the other "experts" are getting tired too.
If you feel your forehead forming a scowl as you read someones annoying and dumb question, do us a favor... don't respond. Because a lot of us are not at the same experience level you are and don't need the added aggrevation that comes with learning something new.
My two cents.