/Designs/GPSnavigator/SW/GPS/N5110.h
File deleted
/Designs/GPSnavigator/SW/GPS/GPS.h
104,11 → 104,8
#define REF_INIT REF_DDR |= _BV(REF)
 
#define ADC_ON ADCSRA |= _BV(ADEN)
#define ADC_OFF ADCSRA &= ~(_BV(ADEN))
#define ADC_OFF ADCSRA &= ~(_BV(ADEN))
 
#define USART_PC_ON UCSR1B = _BV(RXCIE1) | _BV(RXEN1) | _BV(TXEN1)
#define USART_PC_OFF UCSR1B = 0
 
#define KEY1 0
#define KEY2 1
#define KEY3 2
/Designs/GPSnavigator/SW/GPS/GPS.c
2,7 → 2,7
demo for LCD NOKIA5110 and MCP9800 and GPS modul
 
CPU ATMEGA644P
fcpu = 7372800
fcpu = 1MHz
 
!! define PIN,PORT,DDR for IOpin !!
*/
11,23 → 11,9
//************************************************************************
// defines
 
#define POINTNAME " DOMOV"
#define MY_LAT 48*60+57.7647
#define MY_LON 14*60+28.0836
 
/*
// 50°7'38.768"N, 13°32'43.132"E
#define POINTNAME " ORACOV"
#define MY_LAT 50*60+7.64613
#define MY_LON 13*60+32.7189
*/
/*
// 50°7'38.768"N, 13°32'43.132"E
#define POINTNAME " ZAMEK"
#define MY_LAT 50*60+6.191
#define MY_LON 13*60+32.118
*/
 
#define KEY_TIME_DEAD 5 //cca 50ms 8*5
//#define KEY_TIME_START_REPEAT 100 //cca 1s
//#define KEY_TIME_REPEAT 20 //cca 240ms
47,7 → 33,7
#define CLOCK5S 255;
#define CLOCK50MS 5
 
//#define DEBUG
#define DEBUG
 
//************************************************************************
//including
181,9 → 167,6
UCSR0B = _BV(RXCIE0) | _BV(RXEN0) | _BV(TXEN0);
 
//*** USART1 *** RX PD2, TX PD3 PC
DDRD |= _BV(PD3);
PORTD &= (~(_BV(PD3)));
 
#ifndef DEBUG
UBRR1 = 95;
#else
190,7 → 173,7
UBRR1 = 3;
#endif
//UCSR0A =
UCSR1B = _BV(RXCIE1) | _BV(RXEN1) | _BV(TXEN1);
UCSR1B = _BV(RXCIE1) | _BV(RXEN0) | _BV(TXEN1);
 
//*** ADC ***
ADMUX = _BV(REFS1) | _BV(MUX0);
272,7 → 255,6
 
ISR(USART1_RX_vect)
{
 
#ifndef DEBUG
UDR0 = UDR1;
#else
288,8 → 270,6
 
ISR(PCINT3_vect)
{
if (USB_PIN) USART_PC_ON;
else USART_PC_OFF;
if (!TL2_INPUT && USB_INPUT)
{
cli();
305,9 → 285,9
}
 
//EMPTY_INTERRUPT(INT0_vect)
//EMPTY_INTERRUPT(INT2_vect)
//EMPTY_INTERRUPT(WDT_vect)
EMPTY_INTERRUPT(INT0_vect)
EMPTY_INTERRUPT(INT2_vect)
EMPTY_INTERRUPT(WDT_vect)
 
//************************************************************************
// delay_ms functions /define fcpu /
905,7 → 885,7
printf("%4.0fm",gps.altitude);
 
gotoxy(7,2);
printf(POINTNAME);
printf("go home");
gotoxy(9,4);
if (temp < 10000)
1218,7 → 1198,6
GPS_OFF;
REF_OFF;
ADC_OFF;
USART_PC_OFF;
delay_ms(1000);
LED_OFF;
N5110_send_command(POWER_DOWN);
1243,10 → 1222,6
if (temp_wiev) temp();
 
}
 
if (USB_PIN) USART_PC_ON;
else USART_PC_OFF;
 
null_variables();
LCD_N5110_INIT();
displ_start();
1349,8 → 1324,7
LCD_N5110_INIT();
 
//set_static_navigation(0);
if (USB_PIN) USART_PC_ON;
else USART_PC_OFF;
stdout = &mystdout;
sei();
/Designs/GPSnavigator/SW/GPS/GPS.aps
1,0 → 0,0
<AVRStudio><MANAGEMENT><ProjectName>GPS</ProjectName><Created>30-Jun-2008 09:31:04</Created><LastEdit>10-May-2009 00:17:39</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>30-Jun-2008 09:31:04</Created><Version>4</Version><Build>4, 13, 0, 528</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\GPS.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>C:\atmel\ATMEGA644P\home\GPS\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>GPS.c</SOURCEFILE><SOURCEFILE>nmea_scan.c</SOURCEFILE><SOURCEFILE>lcd.c</SOURCEFILE><HEADERFILE>GPS.h</HEADERFILE><HEADERFILE>nmea_scan.h</HEADERFILE><HEADERFILE>lcd.h</HEADERFILE><OTHERFILE>default\GPS.lss</OTHERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega644p</PART><HEX>1</HEX><LIST>1</LIST><MAP>0</MAP><OUTPUTFILENAME>GPS.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>0</ISDIRTY><OPTIONS><OPTION><FILE>GPS.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>nmea_scan.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS><LIB>libm.a</LIB><LIB>libprintf_flt.a</LIB></LIBS><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=7372800UL -O1 -fsigned-char</OPTIONSFORALL><LINKEROPTIONS>-Wl,-u,vfprintf</LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20090313\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20090313\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/><sort sorted="0" column="0" ordername="0" orderaddress="0" ordergroup="0"/></IOView><Files><File00000><FileId>00000</FileId><FileName>GPS.c</FileName><Status>1</Status></File00000><File00001><FileId>00001</FileId><FileName>GPS.h</FileName><Status>1</Status></File00001><File00002><FileId>00002</FileId><FileName>nmea_scan.c</FileName><Status>1</Status></File00002></Files><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>
<AVRStudio><MANAGEMENT><ProjectName>GPS</ProjectName><Created>30-Jun-2008 09:31:04</Created><LastEdit>12-Aug-2008 13:34:22</LastEdit><ICON>241</ICON><ProjectType>0</ProjectType><Created>30-Jun-2008 09:31:04</Created><Version>4</Version><Build>4, 13, 0, 528</Build><ProjectTypeName>AVR GCC</ProjectTypeName></MANAGEMENT><CODE_CREATION><ObjectFile>default\GPS.elf</ObjectFile><EntryFile></EntryFile><SaveFolder>c:\projekts\ATMEL_SW\ATMEGA644P\GPS\</SaveFolder></CODE_CREATION><DEBUG_TARGET><CURRENT_TARGET></CURRENT_TARGET><CURRENT_PART></CURRENT_PART><BREAKPOINTS></BREAKPOINTS><IO_EXPAND><HIDE>false</HIDE></IO_EXPAND><REGISTERNAMES><Register>R00</Register><Register>R01</Register><Register>R02</Register><Register>R03</Register><Register>R04</Register><Register>R05</Register><Register>R06</Register><Register>R07</Register><Register>R08</Register><Register>R09</Register><Register>R10</Register><Register>R11</Register><Register>R12</Register><Register>R13</Register><Register>R14</Register><Register>R15</Register><Register>R16</Register><Register>R17</Register><Register>R18</Register><Register>R19</Register><Register>R20</Register><Register>R21</Register><Register>R22</Register><Register>R23</Register><Register>R24</Register><Register>R25</Register><Register>R26</Register><Register>R27</Register><Register>R28</Register><Register>R29</Register><Register>R30</Register><Register>R31</Register></REGISTERNAMES><COM></COM><COMType>0</COMType><WATCHNUM>0</WATCHNUM><WATCHNAMES><Pane0></Pane0><Pane1></Pane1><Pane2></Pane2><Pane3></Pane3></WATCHNAMES><BreakOnTrcaeFull>0</BreakOnTrcaeFull></DEBUG_TARGET><Debugger><Triggers></Triggers></Debugger><AVRGCCPLUGIN><FILES><SOURCEFILE>GPS.c</SOURCEFILE><SOURCEFILE>nmea_scan.c</SOURCEFILE><SOURCEFILE>lcd.c</SOURCEFILE><HEADERFILE>GPS.h</HEADERFILE><HEADERFILE>nmea_scan.h</HEADERFILE><HEADERFILE>lcd.h</HEADERFILE></FILES><CONFIGS><CONFIG><NAME>default</NAME><USESEXTERNALMAKEFILE>NO</USESEXTERNALMAKEFILE><EXTERNALMAKEFILE></EXTERNALMAKEFILE><PART>atmega644p</PART><HEX>1</HEX><LIST>0</LIST><MAP>0</MAP><OUTPUTFILENAME>GPS.elf</OUTPUTFILENAME><OUTPUTDIR>default\</OUTPUTDIR><ISDIRTY>1</ISDIRTY><OPTIONS><OPTION><FILE>GPS.c</FILE><OPTIONLIST></OPTIONLIST></OPTION><OPTION><FILE>nmea_scan.c</FILE><OPTIONLIST></OPTIONLIST></OPTION></OPTIONS><INCDIRS/><LIBDIRS/><LIBS><LIB>libm.a</LIB><LIB>libprintf_flt.a</LIB></LIBS><LINKOBJECTS/><OPTIONSFORALL>-Wall -gdwarf-2 -DF_CPU=7372800UL -O1 -fsigned-char</OPTIONSFORALL><LINKEROPTIONS>-Wl,-u,vfprintf</LINKEROPTIONS><SEGMENTS/></CONFIG></CONFIGS><LASTCONFIG>default</LASTCONFIG><USES_WINAVR>1</USES_WINAVR><GCC_LOC>C:\WinAVR-20071221\bin\avr-gcc.exe</GCC_LOC><MAKE_LOC>C:\WinAVR-20071221\utils\bin\make.exe</MAKE_LOC></AVRGCCPLUGIN><IOView><usergroups/></IOView><Files><File00000><FileId>00000</FileId><FileName>GPS.c</FileName><Status>1</Status></File00000><File00001><FileId>00001</FileId><FileName>GPS.h</FileName><Status>1</Status></File00001><File00002><FileId>00002</FileId><FileName>nmea_scan.c</FileName><Status>1</Status></File00002></Files><Workspace><File00000><Position>192 71 1282 740</Position><LineCol>85 13</LineCol><State>Maximized</State></File00000><File00001><Position>230 117 1063 589</Position><LineCol>83 11</LineCol></File00001><File00002><Position>189 69 1279 711</Position><LineCol>272 0</LineCol></File00002></Workspace><Events><Bookmarks></Bookmarks></Events><Trace><Filters></Filters></Trace></AVRStudio>