No video

Agregale un teclado a cualquier proyecto!

PCBs rápidos y económicos, impresión 3D y servicios de mecanizado CNC en PCBWay: www.pcbway.com/
Hola gente!
En el video de hoy vemos como implementar un conversor USB a serie con una Raspberry Pi Pico!
Gracias a PCBWay por ser el sponsor del video!
Pico-PIO-USB: github.com/sek...
pico-setup-windows: github.com/ras...
9no aniversario de PCBWay: www.pcbway.com...
Mi mail de contacto: juantinazzoingenieria@gmail.com
Código:
#include "hardware/gpio.h"
#include "hardware/uart.h"
#define UART_ID uart0
#define BAUD_RATE 115200
#define DATA_BITS 8
#define STOP_BITS 1
#define PARITY UART_PARITY_NONE
#define UART_TX_PIN 12
#define UART_RX_PIN 13
void init_uart() //Llamar al arrancar el core0
{
uart_init(UART_ID, BAUD_RATE);
// Set the TX and RX pins by using the function select on the GPIO
// Set datasheet for more information on function select
gpio_set_function(UART_TX_PIN, GPIO_FUNC_UART);
gpio_set_function(UART_RX_PIN, GPIO_FUNC_UART);
uart_set_hw_flow(UART_ID, false, false);
uart_set_format(UART_ID, DATA_BITS, STOP_BITS, PARITY);
uart_set_fifo_enabled(UART_ID, false);
}
uart_putc_raw(UART_ID, ch); //Llamar al enviar un dato por el puerto serie virtual

Пікірлер: 2

  • @marito666
    @marito666 Жыл бұрын

    Hola Juan muy buen trabajo genio!!! saludos

  • @miguelq.l.9757
    @miguelq.l.9757 Жыл бұрын

    Excelente trabajo