// GPIO.c UPIITA-IPN
// JOSE DAVID VALENCIA PESQUEIRA
//
// THIS PROGRAM ALLOWS THE DSP TO SEND A BIT THROUGH A GPIO PIN (PIN 7 IN THIS EXAMPLE)
// TO TURN ON A LED ON
#include <stdio.h>
#include <stdlib.h>
#include <csl_gpio.h>
#include <csl_gpiohal.h>
#include <csl_irq.h>
// GLOBAL VARIABLES
volatile int flag = 1;
volatile int pulse_flag = 1;
// CODE TO DEFINE GPIO HANDLE
GPIO_Handle gpio_handle;
// GPIO REGISTER CONFIGURATION
GPIO_Config gpio_config = {
0x00000000, // gpgc = Interruption passthrough mode
0x0000FFFF, // gpen = All GPIO 0-15 pins enabled
0x0000FFFF, // gdir = All GPIO pins as outputs
0x00000000, // gpval = Saves the logical states of pins
0x00000000, // gphm All interrupts disabled for IO pins
0x00000000, // gplm All interrupts for CPU EDMA disabled
0x00000000 // gppol -- default state */
};
// Function prototypes
void send_edge();
void delay();
// Function definitions
void delay()
{
// Delay function
int count, count2;
for(count = 0; count < 200; count++)
{
for(count2 = 0; count2 < 50000; count2++);
}
}
void send_edge()
{
DSK6713_init();
// Open and configure the GPIO
gpio_handle = GPIO_open( GPIO_DEV0, GPIO_OPEN_RESET );
GPIO_config(gpio_handle,&gpio_config);
// Send values through the pins
GPIO_pinWrite(gpio_handle,GPIO_PIN7,0);
delay();
GPIO_pinWrite(gpio_handle,GPIO_PIN7,1);
delay();
GPIO_pinWrite(gpio_handle,GPIO_PIN7,0);
}
main()
{
send_edge(); // Configures the pins and sends a rising edge
printf(“ ¡Felicidades! ¡Has logrado encender el led! ”);
}
// End of program>>
/* Interruption.c
JOSE DAVID VALENCIA PESQUEIRA
UPIITA-IPN
THIS PROGRAM DETECTS AN EXTERNAL INTERRUPTION ON A GPIO PIN*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <csl_gpio.h>
#include <csl_gpiohal.h>
#include <csl_irq.h>
/* GLOBAL VARIABLES
The flags are marked as volatile, to tell the compiler
that these can be modified by an external event, avoiding
to put them on registers and rather putting them on RAM
so they're ready for immediate use
*/
volatile int startflag = 0;
GPIO_Handle gpio_handle; /* Handle for the GPIO */
// GPIO Registers configuration
GPIO_Config gpio_config = {
0x00000000,
// gpgc = Interruption passtrhrough mode and direct GPIO control mode
0x0000FFFF, // gpen = All GPIO 0-15 pins enabled
0x00000000, // gdir = All GPIO pins as inputs
0x00000000, // gpval = Stores logical level of pins
0x00000010, // IRQ enable for pin 4
0x00000010, // Enable Event for pin 4
0x00000000 // gppol -- default state
};
irq_ext_enable(){
/* First, globally disable interruptions
in the CSR (Control Status Register).
Bit 0 is the GIE (Global Interrupt Enable)*/
CSR = (CSR)&(0xFFFFFFFE);
// Enable NMIE bit in the IER (bit 1)
IER |= 0x00000002;
// Enable INT4 bit in the IER (4th bit)
IER |= 0x00000010;
// Finally, globally enable interruptions in the CSR
CSR |= 0x00000001;
}
main()
{
// To configure the GPIO
gpio_handle = GPIO_open( GPIO_DEV0, GPIO_OPEN_RESET );
GPIO_config(gpio_handle,&gpio_config);
irq_ext_enable();
comm_intr(); //init DSK
DSK6713_LED_init();
while(startflag == 0);
printf(“La interrupción externa encendió el led 3 del dsk6713\n”);
while(1) // Infinite While
}
interrupt void c_int04() //ISR
{
startflag = 1;
iter = 0;
DSK6713_LED_on(0); //To turn on the led
}
#define COMB_FILTER_ORDER 3 // Filter Order, i.e., M
#define DELAY_ARRAY_SIZE 9 // Number of (delayed) input samples to store
int filtersum; // Sum-of-products accumulator for calculating the filter output value
int delay[DELAY_ARRAY_SIZE]; // Array for storing (delayed) input samples
static int gain1 = 1;
static int gain2 = 4;
interrupt void isr() //Interrupt service routine
{
short i; // Loop counter
delay[0] = get_sample() / gain1; // Read filter input sample from ADC and scale the sample
filtersum = delay[0]; // Initialize the accumulator
for (i = COMB_FILTER_ORDER; i > 0; i--)
{
filtersum += delay[i]; // Accumulate array elements
delay[i] = delay[i-1]; // Shift delay elements by one sample
}
filtersum *= gain2; // Scale the sum-of-products
send_output(filtersum); // write filter output sample to DAC
return; // interrupt servicing complete
}
void main()
{
short i; // loop counter
for (i=0; i< DELAY_ARRAY_SIZE; i++) // Initialize delay elements with 0
{
delay[i] = 0;
}
init_all(); // global initialization
while(1); // infinite loop
// do nothing except wait for the interrupt
}
/* David Valencia at DSPRelated.com
This example shows how to use the External Memory Interface
expansion port of Spectrum Digital DSK6713 card as
a set of digital imputs
The use of buffer ICs is mandatory, as these pins can't deliver
too much current */
#define OUTPUT 0xA0000000 // EMIF ADDRESS (updated 3/11/2010)
int *output = (int*)OUTPUT; // Declare a pointer to EMIF's address
void main()
{
// To see how the value is written to the EMIF pins,
// you may prefer to run the program step-by-step
// Write a 32-bit digital value to the pins
*output = 0x48120A00; // Test value
}
// These coefficients are used to filter
#include "yourfiltercoeffs.h"
// scale factor, S_h = 2^K.
#define K 15
int filterout = 0; // In fixed-point implementation, the accumulator is 32-bit int
short delay[LENGTH]; // Short is the 16-bit integer variable
interrupt void isr() // Interrupt function
{
short i;
int Sx = 1;
// Do the filtering as per fixfilt if DIP switch 1 up
if (get_DIP1() == 1) {
// Direct-Form FIR
delay[0] = Sx * get_sample(); // input for filter
filterout = hMax[0] * delay[0]; // Set up filter sum
// Notice, C-arrays go from 0..LENGTH-1
for (i = LENGTH-1; i > 0; i--){ // Get sum of products
filterout += hMax[i] * delay[i];
delay[i] = delay[i-1]; // Renew input array
}
filterout = (filterout>>K); //Move into the lower 16 bits, reverses scaling
//Sign extension carries the upper bit down if negative
send_output(filterout); // output for filter
} else { // If DIP switch 1 down, == 0, then just pass through signal.
send_output(get_sample());
}
return; // return from interrupt
}
void main()
{
short i;
for (i=0; i<= LENGTH-1; i++) {
delay[i] = 0; // init filter processing array
}
init_all(); // init all
while(1); // infinite loop
}
//iirFilterSwitch.c
// Include the filter coefficients and corresponding variables
#include "IIRLPF.h"
#include "IIRHPF.h"
// The intermediate values in the Direct Form II filter
float delay_w1[MWSPT_NSEC1][3];
float delay_w2[MWSPT_NSEC2][3];
// delay_w[i][j] <=> w_i(n-j), j=0,1,2
// i is the section, j the delay
float sectionOut; // yk[n] <=> sectionout
interrupt void isr() //Interrupt function
{
short i; // i loops through the MWSPT_NSEC number of sections
// Use the LPF if DIP switch 1 up
if (get_DIP1() == 1) {
// In the first section, we read in the x-value, apply the first stage gain
sectionOut = NUM1[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC1; i++) { // Loop through all the sections
// Get the new delay_w1[0];
delay_w1[i][0] = sectionOut - DEN1[i][1]*delay_w1[i][1] - DEN1[i][2]*delay_w1[i][2];
// Get the output of this section
sectionOut = NUM1[i][0]*delay_w1[i][0] + NUM1[i][1]*delay_w1[i][1] + NUM1[i][2]*delay_w1[i][2];
// Delay the w's for the next interrupt
delay_w1[i][2] = delay_w1[i][1];
delay_w1[i][1] = delay_w1[i][0];
}
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
} else { // If DIP switch 1 down, == 0, then use HPF
sectionOut = NUM2[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC2; i++) { // Loop through all the sections
// Get the new delay_w2[0];
delay_w2[i][0] = sectionOut - DEN2[i][1]*delay_w2[i][1] - DEN2[i][2]*delay_w2[i][2];
// Get the output of this section
sectionOut = NUM2[i][0]*delay_w2[i][0] + NUM2[i][1]*delay_w2[i][1] + NUM2[i][2]*delay_w2[i][2];
// Delay the w's for the next interrupt
delay_w2[i][2] = delay_w2[i][1];
delay_w2[i][1] = delay_w2[i][0];
}
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
}
return; // return from interrupt
}
void main()
{
short i,j;
for (i=0; i<MWSPT_NSEC1; i++)
for (j=0; j<3; j++)
delay_w1[i][j] = 0; // init intermediate array
for (i=0; i<MWSPT_NSEC2; i++)
for (j=0; j<3; j++)
delay_w2[i][j] = 0; // init intermediate array
init_all(); // init all
while(1); // infinite loop
}
//iirFilter.c
// Include the filter coefficients and corresponding variables
#include "IIRLPF.h"
#define A 1 //The amplitude of added wave
#define FREQ 1000 //The frequency of the sine wave in Hz
// The intermediate values in the Direct Form II filter
float delay_w[MWSPT_NSEC][3];
// delay_w[i][j] <=> w_i(n-j), j=0,1,2
// i is the section, j the delay
float sectionOut; // yk[n] <=> sectionout
interrupt void isr() //Interrupt function t=125us, f = 8kHz
{
short i; // i loops through the MWSPT_NSEC number of sections
int period = 8000 / FREQ;
float rad = FREQ * 2 * pi;
int j = 0;
// Do the filtering if DIP switch 1 up
if (get_DIP1() == 1) {
// In the first section, we read in the x-value, apply the first stage gain
sectionOut = NUM[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC; i++) { // Loop through all the sections
// Get the new delay_w[0];
delay_w[i][0] = sectionOut - DEN[i][1]*delay_w[i][1] - DEN[i][2]*delay_w[i][2];
// Get the output of this section
sectionOut = NUM[i][0]*delay_w[i][0] + NUM[i][1]*delay_w[i][1] + NUM[i][2]*delay_w[i][2];
// Delay the w's for the next interrupt
delay_w[i][2] = delay_w[i][1];
delay_w[i][1] = delay_w[i][0];
}
//Add a tone to sectionOut
sectionOut = sectionOut + A*sin(rad*j); //Add a sine wave of freq rad to sectionOut
j = (j + 1) % period; //Increment the sine wave counter
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
} else { // If DIP switch 1 down, == 0, then just pass through signal.
send_output(get_sample());
}
return; // return from interrupt
}
void main()
{
short i,j;
for (i=0; i<MWSPT_NSEC; i++)
for (j=0; j<3; j++)
delay_w[i][j] = 0; // init intermediate array
init_all(); // init all
while(1); // infinite loop
}
// Include the filter coefficients and corresponding variables
#include "IIRBSF.h"
// The intermediate values in the Direct Form II filter
float delay_w[MWSPT_NSEC][3]; // delay_w[i][j] <=> w_i(n-j), j=0,1,2
// i is the section, j the delay
float sectionOut; // yk[n] <=> sectionout
interrupt void isr() //Interrupt function t=125us, f = 8kHz
{
short i; // i loops through the MWSPT_NSEC number of sections
// Do the filtering if DIP switch 1 up
if (get_DIP1() == 1) {
// In the first section, read in the x-value, apply the first stage gain
sectionOut = NUM[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC; i++) { // Loop through all the sections
// Get the new delay_w[0];
delay_w[i][0] = sectionOut - DEN[i][1]*delay_w[i][1] - DEN[i][2]*delay_w[i][2];
// Get the output of this section
sectionOut = NUM[i][0]*delay_w[i][0] + NUM[i][1]*delay_w[i][1] + NUM[i][2]*delay_w[i][2];
// Delay the w's for the next interrupt
delay_w[i][2] = delay_w[i][1];
delay_w[i][1] = delay_w[i][0];
}
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
} else { // If DIP switch 1 down, == 0, then just pass through signal.
send_output(get_sample());
}
return; //interrupt done
}
void main()
{
short i,j;
for (i=0; i<MWSPT_NSEC; i++)
for (j=0; j<3; j++)
delay_w[i][j] = 0; // init intermediate array
init_all(); // init all
while(1); // infinite loop
}
//iirFilter.c
// Include the filter coefficients and corresponding variables
#include "IIRLPF.h"
#define A 1 //The amplitude of added wave
#define FREQ 1000 //The frequency of the sine wave in Hz
// The intermediate values in the Direct Form II filter
float delay_w[MWSPT_NSEC][3];
// delay_w[i][j] <=> w_i(n-j), j=0,1,2
// i is the section, j the delay
float sectionOut; // yk[n] <=> sectionout
interrupt void isr() //Interrupt function t=125us, f = 8kHz
{
short i; // i loops through the MWSPT_NSEC number of sections
int period = 8000 / FREQ;
float rad = FREQ * 2 * pi;
int j = 0;
// Do the filtering if DIP switch 1 up
if (get_DIP1() == 1) {
// In the first section, we read in the x-value, apply the first stage gain
sectionOut = NUM[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC; i++) { // Loop through all the sections
// Get the new delay_w[0];
delay_w[i][0] = sectionOut - DEN[i][1]*delay_w[i][1] - DEN[i][2]*delay_w[i][2];
// Get the output of this section
sectionOut = NUM[i][0]*delay_w[i][0] + NUM[i][1]*delay_w[i][1] + NUM[i][2]*delay_w[i][2];
// Delay the w's for the next interrupt
delay_w[i][2] = delay_w[i][1];
delay_w[i][1] = delay_w[i][0];
}
//Add a tone to sectionOut
sectionOut = sectionOut + A*sin(rad*j); //Add a sine wave of freq rad to sectionOut
j = (j + 1) % period; //Increment the sine wave counter
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
} else { // If DIP switch 1 down, == 0, then just pass through signal.
send_output(get_sample());
}
return; // return from interrupt
}
void main()
{
short i,j;
for (i=0; i<MWSPT_NSEC; i++)
for (j=0; j<3; j++)
delay_w[i][j] = 0; // init intermediate array
init_all(); // init all
while(1); // infinite loop
}
//iirFilterSwitch.c
// Include the filter coefficients and corresponding variables
#include "IIRLPF.h"
#include "IIRHPF.h"
// The intermediate values in the Direct Form II filter
float delay_w1[MWSPT_NSEC1][3];
float delay_w2[MWSPT_NSEC2][3];
// delay_w[i][j] <=> w_i(n-j), j=0,1,2
// i is the section, j the delay
float sectionOut; // yk[n] <=> sectionout
interrupt void isr() //Interrupt function
{
short i; // i loops through the MWSPT_NSEC number of sections
// Use the LPF if DIP switch 1 up
if (get_DIP1() == 1) {
// In the first section, we read in the x-value, apply the first stage gain
sectionOut = NUM1[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC1; i++) { // Loop through all the sections
// Get the new delay_w1[0];
delay_w1[i][0] = sectionOut - DEN1[i][1]*delay_w1[i][1] - DEN1[i][2]*delay_w1[i][2];
// Get the output of this section
sectionOut = NUM1[i][0]*delay_w1[i][0] + NUM1[i][1]*delay_w1[i][1] + NUM1[i][2]*delay_w1[i][2];
// Delay the w's for the next interrupt
delay_w1[i][2] = delay_w1[i][1];
delay_w1[i][1] = delay_w1[i][0];
}
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
} else { // If DIP switch 1 down, == 0, then use HPF
sectionOut = NUM2[0][0] * get_sample();
for (i=1; i<MWSPT_NSEC2; i++) { // Loop through all the sections
// Get the new delay_w2[0];
delay_w2[i][0] = sectionOut - DEN2[i][1]*delay_w2[i][1] - DEN2[i][2]*delay_w2[i][2];
// Get the output of this section
sectionOut = NUM2[i][0]*delay_w2[i][0] + NUM2[i][1]*delay_w2[i][1] + NUM2[i][2]*delay_w2[i][2];
// Delay the w's for the next interrupt
delay_w2[i][2] = delay_w2[i][1];
delay_w2[i][1] = delay_w2[i][0];
}
// Apply the gain, convert to short and send out
send_output((short)(2 * sectionOut));
// Gain of 2 chosen heuristically for speech from PC
}
return; // return from interrupt
}
void main()
{
short i,j;
for (i=0; i<MWSPT_NSEC1; i++)
for (j=0; j<3; j++)
delay_w1[i][j] = 0; // init intermediate array
for (i=0; i<MWSPT_NSEC2; i++)
for (j=0; j<3; j++)
delay_w2[i][j] = 0; // init intermediate array
init_all(); // init all
while(1); // infinite loop
}
// These coefficients are used to filter
#include "yourfiltercoeffs.h"
// scale factor, S_h = 2^K.
#define K 15
int filterout = 0; // In fixed-point implementation, the accumulator is 32-bit int
short delay[LENGTH]; // Short is the 16-bit integer variable
interrupt void isr() // Interrupt function
{
short i;
int Sx = 1;
// Do the filtering as per fixfilt if DIP switch 1 up
if (get_DIP1() == 1) {
// Direct-Form FIR
delay[0] = Sx * get_sample(); // input for filter
filterout = hMax[0] * delay[0]; // Set up filter sum
// Notice, C-arrays go from 0..LENGTH-1
for (i = LENGTH-1; i > 0; i--){ // Get sum of products
filterout += hMax[i] * delay[i];
delay[i] = delay[i-1]; // Renew input array
}
filterout = (filterout>>K); //Move into the lower 16 bits, reverses scaling
//Sign extension carries the upper bit down if negative
send_output(filterout); // output for filter
} else { // If DIP switch 1 down, == 0, then just pass through signal.
send_output(get_sample());
}
return; // return from interrupt
}
void main()
{
short i;
for (i=0; i<= LENGTH-1; i++) {
delay[i] = 0; // init filter processing array
}
init_all(); // init all
while(1); // infinite loop
}
#define COMB_FILTER_ORDER 3 // Filter Order, i.e., M
#define DELAY_ARRAY_SIZE 9 // Number of (delayed) input samples to store
int filtersum; // Sum-of-products accumulator for calculating the filter output value
int delay[DELAY_ARRAY_SIZE]; // Array for storing (delayed) input samples
static int gain1 = 1;
static int gain2 = 4;
interrupt void isr() //Interrupt service routine
{
short i; // Loop counter
delay[0] = get_sample() / gain1; // Read filter input sample from ADC and scale the sample
filtersum = delay[0]; // Initialize the accumulator
for (i = COMB_FILTER_ORDER; i > 0; i--)
{
filtersum += delay[i]; // Accumulate array elements
delay[i] = delay[i-1]; // Shift delay elements by one sample
}
filtersum *= gain2; // Scale the sum-of-products
send_output(filtersum); // write filter output sample to DAC
return; // interrupt servicing complete
}
void main()
{
short i; // loop counter
for (i=0; i< DELAY_ARRAY_SIZE; i++) // Initialize delay elements with 0
{
delay[i] = 0;
}
init_all(); // global initialization
while(1); // infinite loop
// do nothing except wait for the interrupt
}
/* Interruption.c
JOSE DAVID VALENCIA PESQUEIRA
UPIITA-IPN
THIS PROGRAM DETECTS AN EXTERNAL INTERRUPTION ON A GPIO PIN*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <csl_gpio.h>
#include <csl_gpiohal.h>
#include <csl_irq.h>
/* GLOBAL VARIABLES
The flags are marked as volatile, to tell the compiler
that these can be modified by an external event, avoiding
to put them on registers and rather putting them on RAM
so they're ready for immediate use
*/
volatile int startflag = 0;
GPIO_Handle gpio_handle; /* Handle for the GPIO */
// GPIO Registers configuration
GPIO_Config gpio_config = {
0x00000000,
// gpgc = Interruption passtrhrough mode and direct GPIO control mode
0x0000FFFF, // gpen = All GPIO 0-15 pins enabled
0x00000000, // gdir = All GPIO pins as inputs
0x00000000, // gpval = Stores logical level of pins
0x00000010, // IRQ enable for pin 4
0x00000010, // Enable Event for pin 4
0x00000000 // gppol -- default state
};
irq_ext_enable(){
/* First, globally disable interruptions
in the CSR (Control Status Register).
Bit 0 is the GIE (Global Interrupt Enable)*/
CSR = (CSR)&(0xFFFFFFFE);
// Enable NMIE bit in the IER (bit 1)
IER |= 0x00000002;
// Enable INT4 bit in the IER (4th bit)
IER |= 0x00000010;
// Finally, globally enable interruptions in the CSR
CSR |= 0x00000001;
}
main()
{
// To configure the GPIO
gpio_handle = GPIO_open( GPIO_DEV0, GPIO_OPEN_RESET );
GPIO_config(gpio_handle,&gpio_config);
irq_ext_enable();
comm_intr(); //init DSK
DSK6713_LED_init();
while(startflag == 0);
printf(“La interrupción externa encendió el led 3 del dsk6713\n”);
while(1) // Infinite While
}
interrupt void c_int04() //ISR
{
startflag = 1;
iter = 0;
DSK6713_LED_on(0); //To turn on the led
}
// GPIO.c UPIITA-IPN
// JOSE DAVID VALENCIA PESQUEIRA
//
// THIS PROGRAM ALLOWS THE DSP TO SEND A BIT THROUGH A GPIO PIN (PIN 7 IN THIS EXAMPLE)
// TO TURN ON A LED ON
#include <stdio.h>
#include <stdlib.h>
#include <csl_gpio.h>
#include <csl_gpiohal.h>
#include <csl_irq.h>
// GLOBAL VARIABLES
volatile int flag = 1;
volatile int pulse_flag = 1;
// CODE TO DEFINE GPIO HANDLE
GPIO_Handle gpio_handle;
// GPIO REGISTER CONFIGURATION
GPIO_Config gpio_config = {
0x00000000, // gpgc = Interruption passthrough mode
0x0000FFFF, // gpen = All GPIO 0-15 pins enabled
0x0000FFFF, // gdir = All GPIO pins as outputs
0x00000000, // gpval = Saves the logical states of pins
0x00000000, // gphm All interrupts disabled for IO pins
0x00000000, // gplm All interrupts for CPU EDMA disabled
0x00000000 // gppol -- default state */
};
// Function prototypes
void send_edge();
void delay();
// Function definitions
void delay()
{
// Delay function
int count, count2;
for(count = 0; count < 200; count++)
{
for(count2 = 0; count2 < 50000; count2++);
}
}
void send_edge()
{
DSK6713_init();
// Open and configure the GPIO
gpio_handle = GPIO_open( GPIO_DEV0, GPIO_OPEN_RESET );
GPIO_config(gpio_handle,&gpio_config);
// Send values through the pins
GPIO_pinWrite(gpio_handle,GPIO_PIN7,0);
delay();
GPIO_pinWrite(gpio_handle,GPIO_PIN7,1);
delay();
GPIO_pinWrite(gpio_handle,GPIO_PIN7,0);
}
main()
{
send_edge(); // Configures the pins and sends a rising edge
printf(“ ¡Felicidades! ¡Has logrado encender el led! ”);
}
// End of program>>