vanhungbk1
30-05-2013, 11:09 PM
mình có chương trình này :
#define <16f877a.h>
#include "16F877A.h"
#device *=16 adc=8
//#device PIC16F877A *=16
#use delay(clock=40000000)
#FUSES NOWDT, HS, NOPUT, NOPROTECT, NODEBUG, NOBROWNOUT, NOLVP, NOCPD, NOWRT
//#use rs232(baud=115200,parity=N,xmit=PIN_C6,rcv=PIN_C7, bits=9)
#include <LCD.C>
#INT_EXT
int8 read;
void main(void)
{
// set_tris_b(0);
set_tris_a(0xFF);
set_tris_d(0x00);
//Khoi tao ADC
setup_adc_ports(AN0);
setup_adc(ADC_CLOCK_INTERNAL);
delay_ms(50);
while(TRUE)
{
lcd_init();
read=read_adc();
read =read*0.3951022229;
printf(lcd_putc,"\rLUU LUONG: %u" ,read);
delay_us(10);
lcd_gotoxy( 2,2 );
lcd_putc ("DA VDK:Nhom 8 ");
}
}
========================================
đây là mạch trên Protues
http://nx4.upanh.com/b5.s36.d1/b04e1475f1a8255ca6a6e1cdfc3e1d6c_55986604.ssssssss ssssss.png (http://upanh.com/view/?id=frn9eq4xbnu)
giờ mình muốn thay đổi phần hiển thị trên LCD theo kiểu là khi cho chạy thì LCD hiển thị lên tên của từng ngưới trong nhóm, sau đó mới hiển thị như trên !
thì làm thế nào các bạn ?
#define <16f877a.h>
#include "16F877A.h"
#device *=16 adc=8
//#device PIC16F877A *=16
#use delay(clock=40000000)
#FUSES NOWDT, HS, NOPUT, NOPROTECT, NODEBUG, NOBROWNOUT, NOLVP, NOCPD, NOWRT
//#use rs232(baud=115200,parity=N,xmit=PIN_C6,rcv=PIN_C7, bits=9)
#include <LCD.C>
#INT_EXT
int8 read;
void main(void)
{
// set_tris_b(0);
set_tris_a(0xFF);
set_tris_d(0x00);
//Khoi tao ADC
setup_adc_ports(AN0);
setup_adc(ADC_CLOCK_INTERNAL);
delay_ms(50);
while(TRUE)
{
lcd_init();
read=read_adc();
read =read*0.3951022229;
printf(lcd_putc,"\rLUU LUONG: %u" ,read);
delay_us(10);
lcd_gotoxy( 2,2 );
lcd_putc ("DA VDK:Nhom 8 ");
}
}
========================================
đây là mạch trên Protues
http://nx4.upanh.com/b5.s36.d1/b04e1475f1a8255ca6a6e1cdfc3e1d6c_55986604.ssssssss ssssss.png (http://upanh.com/view/?id=frn9eq4xbnu)
giờ mình muốn thay đổi phần hiển thị trên LCD theo kiểu là khi cho chạy thì LCD hiển thị lên tên của từng ngưới trong nhóm, sau đó mới hiển thị như trên !
thì làm thế nào các bạn ?