RS232 uart Haberleşme ccs compiler 16f877a
#include<16f877a.h>
#fuses hs,nowdt
#use delay(clock=4m)
#use rs232(baud=9600,xmit=pin_c6,rcv=pin_c7,parity=N,stop=1)
#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>
char gelenveri[10];
int a=35;
float b=10.3;
#int_rda
void kesme()
{
gets(gelenveri);
printf(lcd_putc,"\fGelenveri:\n%s",gelenveri);
printf("\n\rGelenveri: %s\n",gelenveri);
}
void main()
{
lcd_init();
printf(lcd_putc,"\fRS232\n Uygulamasi");
printf("\nRS232 Uygulamasi");
enable_interrupts(int_rda);
enable_interrupts(GLOBAL);
while(true)
{
}
}
Hiç yorum yok:
Yorum Gönder
Her yorum bilgidir. Araştırmaya devam...