Skip to content

Instantly share code, notes, and snippets.

#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_ADXL345_U.h>
// Odredi pinove za LED diode
#define LED_ZELENA 4
#define LED_ZUTA 3
#define LED_CRVENA 2
// Postavke jačine potresa
@goran-mahovlic
goran-mahovlic / top_lan8720a.v
Last active February 26, 2023 14:48
LAN8720A - ULX4M
/*
** simple hex packet capture
** packet content will be printed from right to left
** 8 lines of 64-bits (64 bytes)
** adjust skip_bytes to see other parts of a longer packet
*/
`default_nettype none
module top_eth_hex_demo
#(
/**
* This is a demo to be used with Good Display 2.7 touch epaper
*/
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "FT6X36.h"
#include "driver/gpio.h"
#include <stdio.h>
#include <cmath>
#include "pico/stdlib.h"
#include "hardware/watchdog.h"
#include "hardware/structs/dma.h"
#include "WS2812.hpp"
//#define USE_DMX_OUTPUT
#define USE_DMX_INPUT
#define USE_ASYNC_INPUT
module rgb888 (
input logic clock_p,
input logic clock_n,
input logic [31:0] image_data,
input logic image_data_enable,
output logic [47:0] rgb,
output logic [1:0] rgb_enable
);
// Fifo Memory Order
module top(
output green_led_d7,
output orange_led_d8,
output red_led_d5,
output yellow_led_d6,
inout tuner_sda,
output tuner_scl,
inout rtc_sda,
module top(input clk_25mhz,
input cam_sda,
input cam_scl,
input gpio_sda,
input gpio_scl,
output [6:0] nc,
input ftdi_txd, wifi_txd,
output ftdi_rxd, wifi_rxd,
output ftdi_txden,
input cam_enable_gpio,
// 跳ねるLED by KenKen
// https://github.com/KenKenMkIISR/Bouncing-LED
// Arduino版
#include <Adafruit_NeoPixel.h>
#define PIN 2 //信号端子のピン番号
#define LED_NUM 150 //LEDの総数
// #define REVERSE //有効にすると逆向きに落下
BLOCK RESETPATHS;
BLOCK ASYNCPATHS;
LOCATE COMP "serial_tx" SITE "L4";
IOBUF PORT "serial_tx" IO_TYPE=LVCMOS33;
LOCATE COMP "serial_rx" SITE "M1";
IOBUF PORT "serial_rx" IO_TYPE=LVCMOS33;
LOCATE COMP "clk25" SITE "G2";
IOBUF PORT "clk25" IO_TYPE=LVCMOS33;
LOCATE COMP "rst_n" SITE "R1";
IOBUF PORT "rst_n" IO_TYPE=LVCMOS33;