Attachment 'ej_delay.c'

Download

   1 #include <pic/p16f877a.h>
   2 #define FOSC_HZ 20000000
   3 
   4 #include <uart.h>
   5 #include <pinio.h>   /*define los PIN_XY*/
   6 #include <delayms.h>
   7 
   8 int main (void)
   9 {
  10 	char c=0;
  11 	char INTRO[8]="TECLEA\n";
  12 	int T=100;
  13 	
  14 	delayms(100);
  15 
  16 	uart_open(SET_115200_8N1);
  17 
  18 	uart_puts(INTRO);
  19 	while(c!=13)
  20 	{
  21 		if(uart_kbhit()==1)
  22 		{
  23 			c=uart_getc()-'0';
  24 			uart_putc(c+'0');
  25 			T=100*c;
  26 		}
  27 		delayms(T);
  28 		output_high(PIN_C2);
  29 		delayms(T);
  30 		output_low(PIN_C2);
  31 	}
  32 	uart_close();
  33 
  34 	return 0;
  35 }

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-03-02 23:05:40, 28.2 KB) [[attachment:GtkPicGccAbout.png]]
  • [get | view] (2009-03-27 08:20:28, 1.5 KB) [[attachment:LISEZ_MOI]]
  • [get | view] (2009-03-02 23:02:00, 0.2 KB) [[attachment:baud.h]]
  • [get | view] (2009-03-02 23:02:09, 0.5 KB) [[attachment:clavier.txt]]
  • [get | view] (2009-03-02 23:02:21, 0.4 KB) [[attachment:compila.txt]]
  • [get | view] (2009-03-02 22:47:50, 0.3 KB) [[attachment:dispo.tex]]
  • [get | view] (2009-03-02 23:02:36, 0.7 KB) [[attachment:ej_adc_87Xa.c]]
  • [get | view] (2009-03-02 23:02:46, 1.0 KB) [[attachment:ej_comp_87Xa.c]]
  • [get | view] (2009-03-02 23:02:59, 0.5 KB) [[attachment:ej_delay.c]]
  • [get | view] (2009-03-02 23:03:12, 0.6 KB) [[attachment:ej_eeprom.c]]
  • [get | view] (2009-03-02 23:03:22, 0.0 KB) [[attachment:ej_i2c.c]]
  • [get | view] (2009-03-02 23:03:39, 0.6 KB) [[attachment:ej_intext.c]]
  • [get | view] (2009-03-02 23:03:51, 0.4 KB) [[attachment:ej_keypad4x4.c]]
  • [get | view] (2009-03-02 23:04:00, 0.5 KB) [[attachment:ej_keypad4x4flex.c]]
  • [get | view] (2009-03-02 23:04:09, 0.4 KB) [[attachment:ej_memory.c]]
  • [get | view] (2009-03-02 23:04:17, 0.3 KB) [[attachment:ej_pinio.c]]
  • [get | view] (2009-03-02 23:04:25, 0.2 KB) [[attachment:ej_pwm.c]]
  • [get | view] (2009-03-02 23:04:35, 0.8 KB) [[attachment:ej_system.c]]
  • [get | view] (2009-03-02 23:04:46, 0.9 KB) [[attachment:ej_timer0.c]]
  • [get | view] (2009-03-02 23:04:58, 1.2 KB) [[attachment:ej_timer2.c]]
  • [get | view] (2009-03-02 23:05:08, 0.4 KB) [[attachment:ej_uart.c]]
  • [get | view] (2009-03-02 23:05:26, 0.4 KB) [[attachment:ej_uart2.c]]
  • [get | view] (2009-03-02 22:48:40, 0.7 KB) [[attachment:exemples.tex]]
  • [get | view] (2009-03-02 23:05:53, 0.5 KB) [[attachment:interruption1.c]]
  • [get | view] (2009-03-02 23:06:14, 0.4 KB) [[attachment:interruption2.c]]
  • [get | view] (2009-03-02 22:49:06, 3.9 KB) [[attachment:intro.tex]]
  • [get | view] (2009-03-02 23:33:12, 2.7 KB) [[attachment:keypad.tex]]
  • [get | view] (2009-03-02 22:49:18, 3.3 KB) [[attachment:mod_ADC.tex]]
  • [get | view] (2009-03-02 22:49:54, 3.2 KB) [[attachment:mod_I2C.tex]]
  • [get | view] (2009-03-02 22:50:44, 5.9 KB) [[attachment:mod_IO.tex]]
  • [get | view] (2009-03-02 22:51:18, 1.0 KB) [[attachment:mod_PWM.tex]]
  • [get | view] (2009-03-02 22:51:26, 1.5 KB) [[attachment:mod_RAM.tex]]
  • [get | view] (2009-03-02 22:51:42, 2.7 KB) [[attachment:mod_TIMER0.tex]]
  • [get | view] (2009-03-02 22:51:50, 2.1 KB) [[attachment:mod_TIMER2.tex]]
  • [get | view] (2009-03-02 22:51:59, 1.7 KB) [[attachment:mod_UART.tex]]
  • [get | view] (2009-03-02 22:52:07, 3.9 KB) [[attachment:mod_UART2.tex]]
  • [get | view] (2009-03-02 22:49:28, 3.5 KB) [[attachment:mod_comp.tex]]
  • [get | view] (2009-03-02 22:49:37, 0.6 KB) [[attachment:mod_delay.tex]]
  • [get | view] (2009-03-02 22:49:47, 0.7 KB) [[attachment:mod_eeprom.tex]]
  • [get | view] (2009-03-02 22:50:27, 7.0 KB) [[attachment:mod_int.tex]]
  • [get | view] (2009-03-02 22:51:33, 0.4 KB) [[attachment:mod_system.tex]]
  • [get | view] (2009-03-02 22:52:17, 0.8 KB) [[attachment:pic.tex]]
  • [get | view] (2009-03-02 22:52:26, 0.2 KB) [[attachment:pilote.tex]]
  • [get | view] (2009-03-02 22:52:35, 1.0 KB) [[attachment:presentation.tex]]
  • [get | view] (2009-03-02 23:06:23, 0.2 KB) [[attachment:pwm.txt]]
  • [get | view] (2009-03-02 22:52:44, 1.1 KB) [[attachment:questions.tex]]
  • [get | view] (2009-03-02 22:53:01, 0.7 KB) [[attachment:ref.tex]]
  • [get | view] (2009-03-02 22:53:10, 7.4 KB) [[attachment:standard.tex]]
  • [get | view] (2009-03-02 23:06:34, 4.8 KB) [[attachment:tabla1.3]]
  • [get | view] (2009-03-02 23:06:44, 8.9 KB) [[attachment:tabla1.5]]
  • [get | view] (2009-03-02 22:53:26, 380.4 KB) [[attachment:tutoriel.pdf]]
  • [get | view] (2009-03-27 08:18:11, 309.2 KB) [[attachment:tutoriel.tar.gz]]
  • [get | view] (2009-03-02 22:53:34, 0.7 KB) [[attachment:tutoriel.tex]]
  • [get | view] (2009-03-02 22:53:42, 0.2 KB) [[attachment:util.tex]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.

Site hébergé sur un Cloud Public IKOULA Ikoula