소개글
[레이저공학] Nd-YAG실험에 대한 자료입니다.
본문내용
○ PIC Controller의 프로그램 코딩
#include
#device pic16f877 *=16 adc=10
#use delay(clock=10000000)
#zero_ram
․
void busycheck() //lcd busy check function
void sendchar(char bf) //lcd char write function
void gotoxy(int x, int y) //lcd position function
void main()
{
ext_int_edge(0,H_TO_L); //falling edge select
enable_interrupts(int_rb); //portb(4~7) change interrupt enable
enable_interrupts(int_ext); //ext edge(portb,0) interrupt enable
enable_interrupts(global);
#int_ext
ext_isr()
{
portc=0x00;
if (pps==1)
{
while(1)
{ bit_set(portc,0); 1st scr signal
delay_us(500);
bit_clear(portc,0); 1st scr signal
delay_ms(399);
bit_set(portc,1); 2st scr signal
delay_us(500);
bit_clear(portc,1); 2st scr signal
delay_ms(600); }}
if (pps==2)
{
while(1)
{ bit_set(portc,0); 1st scr signal
delay_us(500);
bit_clear(portc,0); 1st scr signal
delay_ms(199);
bit_set(portc,1); 2st scr signal
delay_us(500);
bit_clear(portc,1); 2st scr signal
delay_ms(300); }}
하고 싶은 말
[레이저공학] Nd-YAG실험