📄 main.c
字号:
/*
***********************************************************************************************
* JHD12864G/J Graphical LCD Demo_1 (KS0107/8 controller)
*
* File name :
* Programmer :
* Web presence :
* Language :
* Hardware :
* Version :
* Date :
***********************************************************************************************
*/
#include <p18f452.h> /* for the special function register declarations */
#include <timers.h>
#include <usart.h>
#include "UARTIntC.h"
#include "ks0108.h"
void low_isr(void);
#include "delay.h"
#pragma romdata CONFIG
_CONFIG_DECL(_CONFIG1H_DEFAULT & _OSC_HS_1H,
_CONFIG2L_DEFAULT,
_CONFIG2H_DEFAULT & _WDT_OFF_2H,
_CONFIG3H_DEFAULT,
_CONFIG4L_DEFAULT & _LVP_OFF_4L,
_CONFIG5L_DEFAULT,
_CONFIG5H_DEFAULT,
_CONFIG6L_DEFAULT,
_CONFIG6H_DEFAULT,
_CONFIG7L_DEFAULT,
_CONFIG7H_DEFAULT);
#pragma romdata
void Portinit(void);
void timer_isr (void);
unsigned char Get_GPPRMC(void);
unsigned char Get_PRMC(void);
unsigned char koordinat_bul(void);
unsigned char cArray[60];
unsigned char nArray[]="deneme";
unsigned char eArray[12];
unsigned char k = 0;
unsigned char chData;
/************************* Serial Port High priotiy Interrupt***********************
Description:
Baudrate: 4Mhz for 4800budrate
TX size Buffer 4
RX size Buffer 4
************************************************************************************
*/
// serial interrupt taken as high priority interrupt
#pragma code uart_int_service = 0x08
void uart_int_service(void)
{
_asm goto low_isr _endasm
}
#pragma code
#pragma interruptlow low_isr save=section(".tmpdata")
void low_isr(void)
{
// call of library module function, MUST
UARTIntISR();
}
/************************* TimerO Low priotiy Interrupt *****************************
Description:
************************************************************************************
*/// 256 us control for Serial port
#pragma code low_vector=0x18
void low_interrupt (void)
{
_asm GOTO timer_isr _endasm
}
#pragma code
#pragma interruptlow timer_isr
void timer_isr (void)
{
// call of library module function, MUST
INTCONbits.TMR0IF = 0;
//PORTB=~PORTB;
Get_PRMC(); //$GPRMC,154559.00,V,2328.2329,N,12056.9328,E,,,150204,,,N*4C
}
/*
-----------------------------------unsigned char Get_GPPRMC(void)----------------------------
Description: A
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -