Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 01, 2024, 12:50:10 00:50


Login with username, password and session length


Pages: [1]
Print
Author Topic: 38400 baudrate with 20Mz crystal  (Read 5014 times)
0 Members and 1 Guest are viewing this topic.
MicroBox
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 0


« on: November 06, 2010, 06:10:41 18:10 »

I want to send data from PC to mcu pic16F877A with the following code
Code:
define OSC 20

gpsin var portc.7 'rx
gpsout var portc.6 'tx


HH VAR byte
MM VAR BYTE
SS VAR BYTE
ND VAR BYTE
NM VAR BYTE
NMD VAR WORD
WD VAR BYTE
WM VAR BYTE
WMD VAR WORD
AR VAR BYTE[20]

START:
SERIN2 gpsin,16572,[WAIT("$GPGGA"),WAIT(","),DEC2 hH,DEC2 mM,DEC2 sS,_
WAIT(","),DEC2 ND,DEC2 NM,WAIT("."),DEC3 NMD,WAIT(",N,"),_
DEC3 WD,DEC2 WM,WAIT("."),DEC3 WMD]

PAUSE 1000

SEROUT2 gpsout,16572,[DEC2 HH,DEC2 MM,DEC2 SS,_
DEC2 ND,DEC2 NM,DEC3 NMD,DEC3 WD,DEC2 WM,DEC3 WMD,13,10]
goto start

I got no luck in the receiving window(hyperterm) when entering $GPGGA,114708.600,1114.5089,N,12500.3864,E,1,6,1.6 7,23.5,M,55.4,M,,*69, what do I'm missing?

thanks in advance,
microbox
« Last Edit: November 06, 2010, 06:19:47 18:19 by MicroBox » Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2429

Thank You
-Given: 405
-Receive: 545


Uhm? where did pickit put my mute button


« Reply #1 on: November 06, 2010, 06:51:59 18:51 »

your already talking to the best people for this so how many forums are you going to ask the same question ?
« Last Edit: November 07, 2010, 04:31:47 04:31 by bbarney » Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
MicroBox
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 0


« Reply #2 on: November 07, 2010, 12:49:05 00:49 »

Hi, my apology for being impatient, just got a little frustrated with the GPS I bought, it was running fine for 3 days with the code I have and settings. I was not even done with testing to have it final. I been working on it the entire week. Only to find out it reset it self to its factory settings with a baud rate of 57600.
Pls. accept my apology. this will not happen again.

regards,
microbox
Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2429

Thank You
-Given: 405
-Receive: 545


Uhm? where did pickit put my mute button


« Reply #3 on: November 07, 2010, 04:31:24 04:31 »

Hi, my apology for being impatient, just got a little frustrated with the GPS I bought, it was running fine for 3 days with the code I have and settings. I was not even done with testing to have it final. I been working on it the entire week. Only to find out it reset it self to its factory settings with a baud rate of 57600.
Pls. accept my apology. this will not happen again.

regards,
microbox

There was no harm asking here i just wondered why when you already had asked in the best place for answers in this case
They have some really great people there who've been there and done that
Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
MicroBox
Junior Member
**
Offline Offline

Posts: 35

Thank You
-Given: 11
-Receive: 0


« Reply #4 on: November 07, 2010, 08:50:40 08:50 »

 8)I got my simple code running.
Code:
@ DEVICE HS_OSC
DEFINE    OSC 20
main:

serout2 PortC.6,32774,["To PC",$D]  ;@38400 To PC
serout2 PortB.6,84,[$1B,$45]
serout2 PortB.6,84,["To LCD"] ;@9600 To Lcd
pause 500

goto main
end

regards,
microbox
Logged
bbarney
Moderator
Hero Member
*****
Offline Offline

Posts: 2429

Thank You
-Given: 405
-Receive: 545


Uhm? where did pickit put my mute button


« Reply #5 on: November 07, 2010, 12:44:09 12:44 »

Good ,glad you got it working
Logged

Ever wonder why Kamikaze pilot's wore helmet's ?
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC