/Modules/HumanInterfaces/LCD2L4P02A/SW/PIC/PIC16F887/main.c
0,0 → 1,45
#include "main.h"
 
#define LCD_ENABLE_PIN PIN_E0 ////
#define LCD_RS_PIN PIN_E1 ////
#define LCD_RW_PIN PIN_E2 ////
#define LCD_DATA4 PIN_D4 ////
#define LCD_DATA5 PIN_D5 ////
#define LCD_DATA6 PIN_D6 ////
#define LCD_DATA7 PIN_D7
#include <lcd.c>
 
void main()
{
int16 i=0;
 
setup_adc_ports(NO_ANALOGS|VSS_VDD);
setup_adc(ADC_CLOCK_DIV_2);
setup_spi(SPI_SS_DISABLED);
setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
setup_timer_1(T1_DISABLED);
setup_timer_2(T2_DISABLED,0,1);
setup_ccp1(CCP_OFF);
setup_comparator(NC_NC_NC_NC); // This device COMP currently not supported by the PICWizard
setup_oscillator(OSC_8MHZ);
 
lcd_init();
lcd_putc("(c) Kaklik 2013");
lcd_gotoxy(3,2);
lcd_putc("www.mlab.cz");
Delay_ms(2000);
lcd_init();
 
while (TRUE)
{
lcd_gotoxy(1,1);
 
printf(lcd_putc,"LCD test");
lcd_gotoxy(1,2);
printf(lcd_putc,"%c %x ",i,i);
i++;
 
Delay_ms(500);
}
 
}
/Modules/HumanInterfaces/LCD2L4P02A/SW/PIC/PIC16F887/main.h
0,0 → 1,21
#include <16F887.h>
#device adc=10
 
#FUSES NOWDT //No Watch Dog Timer
#FUSES INTRC //Internal RC Osc
#FUSES NOPUT //No Power Up Timer
#FUSES MCLR //Master Clear pin enabled
#FUSES NOPROTECT //Code not protected from reading
#FUSES NOCPD //No EE protection
#FUSES NOBROWNOUT //No brownout reset
#FUSES IESO //Internal External Switch Over mode enabled
#FUSES FCMEN //Fail-safe clock monitor enabled
#FUSES NOLVP //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NODEBUG //No Debug mode for ICD
#FUSES NOWRT //Program memory not write protected
#FUSES BORV40 //Brownout reset at 4.0V
 
#use delay(clock=8000000)
#use i2c(master, sda=PIN_C4, scl=PIN_C3)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)
 
/Modules/HumanInterfaces/LCD2L4P02A/SW/PIC/PIC16F887/main.hex
0,0 → 1,85
:1000000001308A00CC2900000A108A100A118207E8
:1000100028340C3401340634A8312910CB306B3627
:10002000E9352019B0183300F73B77176D36613189
:10003000AE317A00CC214410F432733A00012730FB
:10004000840083130008031932280230F800F701F6
:10005000F70B2828F80B27289730F700F70B2E28E6
:10006000800B252808002E18372808123828081673
:10007000831608128312AE183F288812402888166B
:100080008316881283122E19472808134828081748
:10009000831608138312AE194F2888135028881727
:1000A0008316881300008312091483160910582838
:1000B0005928831209108316091083120800AF0112
:1000C0008316081600308312081A0130AF04831615
:1000D000881600308312881A0130F7000310F70DDC
:1000E0007708AF048316081700308312081B01300D
:1000F000F700F70DF70DFC30F7057708AF0483160E
:10010000881700308312881B0130F700F70DF70DB8
:10011000F70DF830F7057708AF042F08F80008004E
:10012000831609108910091183128910831689100A
:1001300008168816081788178312091583160911DF
:1001400000008312091483160910000083125F2037
:100150007808AE00091083160910000083120914F4
:1001600083160910B32883125F207808AD000910A8
:1001700083160910081288120813881383122E0E92
:10018000F700F030F70577082D04F8007808AD0087
:10019000AD1FCC2883169828AB08031DD1288910E1
:1001A000D22889148316891000008312091183163E
:1001B00009110000831209108316091083122C0EF6
:1001C000AD000F30AD052D08AE0033202C080F39DF
:1001D000AD00AE0033200800831608128812081301
:1001E0008813091089100911831289108316891048
:1001F000831209118316091183120910831609103D
:100200000F308312A7001F200130A3002308033CF6
:10021000031C12290330AE0033200530A7001F2035
:10022000A30A06290230AE003320A3012308033CB1
:10023000031C232923080420A400AB012408AC00DC
:100240009020A30A16290800280B27292A294030C4
:10025000A9002B29A90101302702A9072908803804
:10026000AA00AB012A08AC00902008002608073A33
:10027000031944290B3A03194929063A031951294C
:10028000023A031957295C290130A700A80024214C
:100290006229AB010130AC0090200230A7001F2082
:1002A00062290130A7000230A80024216229AB0195
:1002B0001030AC00902062290130AB002608AC0061
:1002C000902062290800831603178C170C14000075
:1002D000000083120C087F390319A7290313A30018
:1002E00003170D080313A40003170F080313A50039
:1002F0002308A6003621240803178D0003132508C0
:1003000003178F0083168C170C1400000000831253
:100310000C0D0E0D7F390319A7290313A300031732
:100320000D080313A40003170F080313A5002308E7
:10033000A6003621240803178D0003132508031790
:100340008F008D0A03198F0A031363290317031300
:100350000800A41BBB290F30F700230EF7050A3055
:1003600077020318B6293030F707B8292408F707B1
:100370007708A60036210F30A3050A3023020318A0
:10038000C3293030C529A4132408A3072308A600D5
:1003900036218A110A12742A840183131F308305BF
:1003A000713083168F000F08031787110C30031369
:1003B0009900A2309800903083129800831603179A
:1003C0000908C039890003131F129F120030031758
:1003D00088008312870188018901FF300313A00080
:1003E000A201A101831603170908C039890003136C
:1003F0001F129F12003003178800831203131F136C
:100400009F1383169F1783121F149412A0122008A3
:100410008316870083122016200883168700831214
:10042000A011200883168700013083129400003049
:10043000831694000108C73908388100831290019F
:100440000030F800920000308316920083122015CD
:100450002008831687008312970183169B019C0155
:1004600001309D00831203178701880189017130D3
:10047000831603138F000F088312EC200C30031730
:100480008D0000308F00031363210330A70002307A
:10049000A8002421143003178D0000308F000313AF
:1004A00063210830A300FA30A7001F20A30B532AB2
:1004B000EC200130A700A80024211A3003178D007A
:1004C00000308F00031363210130A7000230A80021
:1004D00024212108A60036212030A600362121083B
:1004E000A3005730A400A9292030A6003621A10A74
:1004F0000319A20A0430A300FA30A7001F20A30B9F
:060500007C2A592A630069
:04400E00F52CFF3F4F
:00000001FF
;PIC16F887
;CRC=CD35 CREATED="10-IX-13 13:38"
/Modules/HumanInterfaces/LCD2L4P02A/SW/PIC/PIC16F887/main.pjt
0,0 → 1,36
[PROJECT]
Target=main.hex
Development_Mode=
Processor_Text=PIC16F887
ToolSuite=CCS
Processor=0x887F
[main]
Type=4
Path=
FileList=
BuildTool=
OptionString=
AdditionalOptionString=
[mru-list]
1=main.c
[Windows]
0=0000 %S 0 0 796 451 3 0
[Opened Files]
1=main.c
2=
3=C:\Program Files (x86)\PICC\devices\16F887.h
4=C:\Program Files (x86)\PICC\drivers\lcd.c
5=..\SHT25.h
6=..\SHT25.c
7=..\LTS01.h
8=..\LTS01.c
9=..\HMC5883L.h
10=..\HMC5883L.c
11=C:\Program Files (x86)\PICC\drivers\math.h
12=
[Target Data]
OptionString=-p +FM
FileList=main.c
[Units]
Count=1
1=main (main)