CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

could somebody help me to check my code...

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cokicoki



Joined: 28 Mar 2010
Posts: 1

View user's profile Send private message Send e-mail AIM Address Yahoo Messenger

could somebody help me to check my code...
PostPosted: Sun Mar 28, 2010 6:24 am     Reply with quote

i'm going to interface between GPS sensor with 16F877a....
with 38400 baudrate and 20Mhz....
i connecting gps tx to pic rx ang gps rx to pic tx....is it enough?...

this is my coding...can somebody help me out....it's appear nothing to my hyperterminal....somewhere might be wrong...but i couldn't trace it...:(


+++++++++++++++
Locking.

Reason: PicBasic code is Off Topic

-- Forum Moderator
+++++++++++++++


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
code:
DEFINE HSER_RCSTA 90h ' Enable serial port & continuous receive
DEFINE HSER_TXSTA 24h ' Enable transmit, BRGH = 1
DEFINE HSER_SPBRG 77 ' 38400 Baud @ 0.16%
define HSER_BAUD 38400
DEFINE HSER_CLROERR 1 ' Clear overflow automatically

define OSC 20 'define the oscillator

rem variables
hh var byte

'include "modedefs.bas" 'include serial modes

gpsin var portc.7 'rx
gpsout var portc.6 'tx
gpsdata var portb.2

timeH var byte(2) 'variables define start
timeM var byte(2)
timeS var byte(2)

latD var byte(2)
latM var byte(2)
latS var byte(2)
latH var byte

lonD var byte(3)
lonM var byte(2)
lonS var byte(2)
lonH var byte
sats VAR BYTE(2)
sats2 VAR BYTE(2)
sats3 VAR BYTE(2)
sats4 VAR BYTE(2)
sats5 VAR BYTE(2)
sats6 VAR BYTE(2)
sats7 VAR BYTE(2)
sats8 VAR BYTE(2)
sats9 VAR BYTE(2)
sats10 VAR BYTE(2)
sats11 VAR BYTE(2)
sats12 VAR BYTE(2)
Diameter var byte(2)
Meg var byte(2)
Mode var byte(2)


spdI var byte
spdD var byte(2)

head var byte(3)

mon var byte(2)
day var byte(2)
yr var byte(2)

stat var byte
G var byte
D var byte
M var byte
A var byte
F var byte
GPGGA_IN var word


TEMPWORD var word
DEBOUNCE var byte
CMDACK var byte 'variable define end

start:
hserout ["GPS data:"]

gps:


SERIN2 portB.2,188,2000,Nogps,[WAIT("$"),str sats\1, STR sats2\1, STR sats3\1, STR sats4\1,_
str sats5\1, str sats6\1,str sats7\1, str sats8\1,_
str sats9\1, str sats10\1, str sats11\1, str sats12\1,_
skip 5, str dia\2, str mes\2, skip 26, str ano\2 ]

hserout [sats, sats2,sats3,sats4, sats5, sats6, sats7, sats8, sats9, sats10,sats11, sats12, diameter, Meg, Mode]

goto gps

Nogps:
hserout ["No GPS data"]
pause 2000

goto start

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

it's not working in my hyperterminal..help me please.....


Crying or Very sad
Ttelmah



Joined: 11 Mar 2010
Posts: 19519

View user's profile Send private message

PostPosted: Sun Mar 28, 2010 6:51 am     Reply with quote

Wrong forum.

What you are posting, is _not_ CCS C code. You need to go to a forum dealing with the compiler you are using.

Best Wishes
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group