SlideShare a Scribd company logo
C:UsersDaryDesktopreloj con sensor de temperatura LM 35PROGRAMArelo con temp.c
1:
2: ///**********//(INSTITUTO SUPERIO TECNOLOGICO PUBLICO "TUPAC AMARU DEL CUSCO-PERU")/
3: ///********//INTRUMETACION INDISTRIAL//**************
4: ///****************DISEÑO DE DARIO HUAMAN CUNSA****************/////
5:
6:
7: #include <16f877a.h>
8: #device adc=10
9: #fuses hs
10: #use delay(clock=16mhz)
11: #define RTC_SCLK PIN_c6
12: #define RTC_IO PIN_c7
13: #define RTC_RST PIN_c5
14: #define use_portd_lcd TRUE
15: #include <ds1302.c>
16: #include <lcd.c>
17: //***DECLARACION DE VARIABLES ***//
18: int saniye,dakika,saat,gun,ay,yil,haftanin_gunu;
19: int16 vd=0;
20: float va;
21: float dato1;
22: float v_real;
23: float kelvin;
24: float centigrado;
25: void main(void)
26: ///***PROGRAMA PRINCIPAL***///
27: {
28: lcd_init(); //inicializa el LCD
29: rtc_init(); // inicializa el DS1302
30: rtc_set_datetime(31,12,13,2,23,59); // Tarih ve Saat ayarları yapılıyor
31: setup_adc(adc_clock_internal);//oscilador interno para la convercion
32: setup_adc_ports(AN0_AN1_VREF_VREF);
33: while(true)//bucle....
34: {
35: rtc_get_time(saat,dakika,saniye);
36: rtc_get_date(gun,ay,yil,haftanin_gunu);
37: set_adc_channel(0);//activa el canal analogico
38: delay_ms(10);
39: vd=read_adc();//lectura del valor digital
40: dato1=vd*1.0;
41: va=(3*dato1)/1023;
42: v_real=va/2;
43: centigrado=v_real*1000;//a milivoltios
44: centigrado=centigrado/10;//sensibilidad 10mv/c
45: kelvin=centigrado+273.13;//convecion a kelvin
46: lcd_gotoxy(1,1);
47: printf(lcd_putc,"T=%3.0f%cC %02d/%02d/%02d",centigrado,223,gun,ay,yil);
48: switch(haftanin_gunu) // DS1302'den sayısal olarak alınan haftanın günü bilgis
49: { // metin olarak karşılık atanıyor
50: case 1: printf(lcd_putc,"PAZ"); break; // EÄŸer “1? ise LCD’ye PAZ yaz
51: case 2: printf(lcd_putc,"PZT"); break; // EÄŸer “2? ise LCD’ye PZT yaz
52: case 3: printf(lcd_putc,"SAL"); break; // EÄŸer “3? ise LCD’ye SAL yaz
53: case 4: printf(lcd_putc,"CRS"); break; // EÄŸer “4? ise LCD’ye CRS yaz
54: case 5: printf(lcd_putc,"PER"); break; // EÄŸer “5? ise LCD’ye PER yaz
55: case 6: printf(lcd_putc,"CUM"); break; // EÄŸer “6? ise LCD’ye CUM yaz
56: case 7: printf(lcd_putc,"CTS"); break; // EÄŸer “7? ise LCD’ye CTS yaz
57: }
58: printf(lcd_putc,"nHoras= %02d:%02d:%02d",saat,dakika,saniye);
59: delay_ms(1000); // 1 sn gecikme veriliyor
60: }
61: }
62:
63:
64:
1

More Related Content

Viewers also liked

Stocks watch list by mayank
Stocks watch list by mayankStocks watch list by mayank
Stocks watch list by mayank
Mayank Arya
 
White Paper: Defense In Breadth
White Paper: Defense In BreadthWhite Paper: Defense In Breadth
White Paper: Defense In Breadth
Courtland Smith
 
Higiene y seguridad industrial
Higiene y seguridad industrialHigiene y seguridad industrial
Higiene y seguridad industrial
petteroviedo
 
Grid07 4 Tzannetakis
Grid07 4 TzannetakisGrid07 4 Tzannetakis
Grid07 4 Tzannetakis
imec.archive
 
Lorena carrero perez
Lorena carrero perez Lorena carrero perez
Lorena carrero perez
lorenacarreroperez123
 
Concept Explication
Concept ExplicationConcept Explication
Concept Explication
phdserena
 
Ghost in the_shell
Ghost in the_shellGhost in the_shell
Ghost in the_shell
unst254spring
 
Our Top 5 List
Our Top 5 ListOur Top 5 List
Our Top 5 List
jaherntech
 
Presentation3
Presentation3Presentation3
Presentation3
VivyCool
 
Presentation2
Presentation2Presentation2
Presentation2
VivyCool
 
Ghost in the_shell
Ghost in the_shellGhost in the_shell
Ghost in the_shell
unst254spring
 
Assignment 1
Assignment 1Assignment 1
Assignment 1
ripkuna
 
Ibm jamcracker csp2_solution_brief_1
Ibm jamcracker csp2_solution_brief_1Ibm jamcracker csp2_solution_brief_1
Ibm jamcracker csp2_solution_brief_1
SABIRMOHAMED
 
Blockchaininnovationsv2
Blockchaininnovationsv2Blockchaininnovationsv2
Blockchaininnovationsv2
MecklerMedia
 
Literacy and learning
Literacy and learningLiteracy and learning
Literacy and learning
Gail Lovely
 
Scanomat and pydio
Scanomat and pydio Scanomat and pydio
Scanomat and pydio
Pydio File sharing platform
 
NAME's Drafted Appendix - K
NAME's Drafted Appendix - KNAME's Drafted Appendix - K

Viewers also liked (17)

Stocks watch list by mayank
Stocks watch list by mayankStocks watch list by mayank
Stocks watch list by mayank
 
White Paper: Defense In Breadth
White Paper: Defense In BreadthWhite Paper: Defense In Breadth
White Paper: Defense In Breadth
 
Higiene y seguridad industrial
Higiene y seguridad industrialHigiene y seguridad industrial
Higiene y seguridad industrial
 
Grid07 4 Tzannetakis
Grid07 4 TzannetakisGrid07 4 Tzannetakis
Grid07 4 Tzannetakis
 
Lorena carrero perez
Lorena carrero perez Lorena carrero perez
Lorena carrero perez
 
Concept Explication
Concept ExplicationConcept Explication
Concept Explication
 
Ghost in the_shell
Ghost in the_shellGhost in the_shell
Ghost in the_shell
 
Our Top 5 List
Our Top 5 ListOur Top 5 List
Our Top 5 List
 
Presentation3
Presentation3Presentation3
Presentation3
 
Presentation2
Presentation2Presentation2
Presentation2
 
Ghost in the_shell
Ghost in the_shellGhost in the_shell
Ghost in the_shell
 
Assignment 1
Assignment 1Assignment 1
Assignment 1
 
Ibm jamcracker csp2_solution_brief_1
Ibm jamcracker csp2_solution_brief_1Ibm jamcracker csp2_solution_brief_1
Ibm jamcracker csp2_solution_brief_1
 
Blockchaininnovationsv2
Blockchaininnovationsv2Blockchaininnovationsv2
Blockchaininnovationsv2
 
Literacy and learning
Literacy and learningLiteracy and learning
Literacy and learning
 
Scanomat and pydio
Scanomat and pydio Scanomat and pydio
Scanomat and pydio
 
NAME's Drafted Appendix - K
NAME's Drafted Appendix - KNAME's Drafted Appendix - K
NAME's Drafted Appendix - K
 

Similar to Programa en ccs compiller

U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
Wave Digitech
 
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docxSnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
jensgosney
 
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docxProjeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
briancrawford30935
 
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALEPROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
Lesmardin Hasugian
 
G meteo Weather station code
G meteo Weather station code G meteo Weather station code
G meteo Weather station code
Dimitrios Nikolaidis
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
Docker, Inc.
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
Simen Li
 
How the world gets its weather
How the world gets its weather How the world gets its weather
How the world gets its weather
Ravi Yadav
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
ssuserb4d806
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
Supriya Radhakrishna
 
Verilog lab mauual
Verilog lab mauualVerilog lab mauual
Verilog lab mauual
BHUSHAN MHASKE
 
P sim.val
P sim.valP sim.val
P sim.val
Corneliu Modilca
 
Ir remote kit_blink.pde
Ir remote kit_blink.pdeIr remote kit_blink.pde
Ir remote kit_blink.pde
Core Pale
 
Gps c
Gps cGps c
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
Aashiq Ahamed N
 
Lcd n PIC16F
Lcd n PIC16FLcd n PIC16F
Lcd n PIC16F
hairilfaiz86
 
Tool sdl2pml
Tool sdl2pmlTool sdl2pml
Tool sdl2pml
S56WBV
 
망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7
종인 전
 
sss
ssssss
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
jayeshpar2006
 

Similar to Programa en ccs compiller (20)

U-Boot presentation 2013
U-Boot presentation  2013U-Boot presentation  2013
U-Boot presentation 2013
 
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docxSnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
SnälllaDebugSnällla.exeSnälllaDebugSnällla.ilkSnäl.docx
 
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docxProjeto1617_FaseFinalMakefileall simulador monitormoni.docx
Projeto1617_FaseFinalMakefileall simulador monitormoni.docx
 
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALEPROGRAM KONVERSI CITRA BERWARNA MENJADI  CITRA GRAYSCALE
PROGRAM KONVERSI CITRA BERWARNA MENJADI CITRA GRAYSCALE
 
G meteo Weather station code
G meteo Weather station code G meteo Weather station code
G meteo Weather station code
 
DCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker CaptainsDCEU 18: Tips and Tricks of the Docker Captains
DCEU 18: Tips and Tricks of the Docker Captains
 
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
[嵌入式系統] MCS-51 實驗 - 使用 IAR (2)
 
How the world gets its weather
How the world gets its weather How the world gets its weather
How the world gets its weather
 
Labs_BT_20221017.pptx
Labs_BT_20221017.pptxLabs_BT_20221017.pptx
Labs_BT_20221017.pptx
 
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
M.TECH 1ST SEM COMPUTER SCIENCE AOS LAB PRGMS 2014
 
Verilog lab mauual
Verilog lab mauualVerilog lab mauual
Verilog lab mauual
 
P sim.val
P sim.valP sim.val
P sim.val
 
Ir remote kit_blink.pde
Ir remote kit_blink.pdeIr remote kit_blink.pde
Ir remote kit_blink.pde
 
Gps c
Gps cGps c
Gps c
 
Gas leakage detection system
Gas leakage detection systemGas leakage detection system
Gas leakage detection system
 
Lcd n PIC16F
Lcd n PIC16FLcd n PIC16F
Lcd n PIC16F
 
Tool sdl2pml
Tool sdl2pmlTool sdl2pml
Tool sdl2pml
 
망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7망고100 보드로 놀아보자 7
망고100 보드로 놀아보자 7
 
sss
ssssss
sss
 
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
IBM Notes Traveler Administration and Log Troubleshooting tips - Part 2
 

Programa en ccs compiller

  • 1. C:UsersDaryDesktopreloj con sensor de temperatura LM 35PROGRAMArelo con temp.c 1: 2: ///**********//(INSTITUTO SUPERIO TECNOLOGICO PUBLICO "TUPAC AMARU DEL CUSCO-PERU")/ 3: ///********//INTRUMETACION INDISTRIAL//************** 4: ///****************DISEÑO DE DARIO HUAMAN CUNSA****************///// 5: 6: 7: #include <16f877a.h> 8: #device adc=10 9: #fuses hs 10: #use delay(clock=16mhz) 11: #define RTC_SCLK PIN_c6 12: #define RTC_IO PIN_c7 13: #define RTC_RST PIN_c5 14: #define use_portd_lcd TRUE 15: #include <ds1302.c> 16: #include <lcd.c> 17: //***DECLARACION DE VARIABLES ***// 18: int saniye,dakika,saat,gun,ay,yil,haftanin_gunu; 19: int16 vd=0; 20: float va; 21: float dato1; 22: float v_real; 23: float kelvin; 24: float centigrado; 25: void main(void) 26: ///***PROGRAMA PRINCIPAL***/// 27: { 28: lcd_init(); //inicializa el LCD 29: rtc_init(); // inicializa el DS1302 30: rtc_set_datetime(31,12,13,2,23,59); // Tarih ve Saat ayarları yapılıyor 31: setup_adc(adc_clock_internal);//oscilador interno para la convercion 32: setup_adc_ports(AN0_AN1_VREF_VREF); 33: while(true)//bucle.... 34: { 35: rtc_get_time(saat,dakika,saniye); 36: rtc_get_date(gun,ay,yil,haftanin_gunu); 37: set_adc_channel(0);//activa el canal analogico 38: delay_ms(10); 39: vd=read_adc();//lectura del valor digital 40: dato1=vd*1.0; 41: va=(3*dato1)/1023; 42: v_real=va/2; 43: centigrado=v_real*1000;//a milivoltios 44: centigrado=centigrado/10;//sensibilidad 10mv/c 45: kelvin=centigrado+273.13;//convecion a kelvin 46: lcd_gotoxy(1,1); 47: printf(lcd_putc,"T=%3.0f%cC %02d/%02d/%02d",centigrado,223,gun,ay,yil); 48: switch(haftanin_gunu) // DS1302'den sayısal olarak alınan haftanın günü bilgis 49: { // metin olarak karşılık atanıyor 50: case 1: printf(lcd_putc,"PAZ"); break; // EÄŸer “1? ise LCD’ye PAZ yaz 51: case 2: printf(lcd_putc,"PZT"); break; // EÄŸer “2? ise LCD’ye PZT yaz 52: case 3: printf(lcd_putc,"SAL"); break; // EÄŸer “3? ise LCD’ye SAL yaz 53: case 4: printf(lcd_putc,"CRS"); break; // EÄŸer “4? ise LCD’ye CRS yaz 54: case 5: printf(lcd_putc,"PER"); break; // EÄŸer “5? ise LCD’ye PER yaz 55: case 6: printf(lcd_putc,"CUM"); break; // EÄŸer “6? ise LCD’ye CUM yaz 56: case 7: printf(lcd_putc,"CTS"); break; // EÄŸer “7? ise LCD’ye CTS yaz 57: } 58: printf(lcd_putc,"nHoras= %02d:%02d:%02d",saat,dakika,saniye); 59: delay_ms(1000); // 1 sn gecikme veriliyor 60: } 61: } 62: 63: 64: 1