Category Archives: Computer Engineering
Nand / Nor

i know any gate can convert to NAND or NOR, asked many time why people always use NAND instead of NOR, no one can answer, but i found the answer now. NAND need voltage, NOR need current.
Heltec Arduino super simple tutorial

Buy from here. Offical website. Steps to make it work in arduino: 3. Burn these examples To try the wifi example 2. Change the wifi ID and password, case sensitive 3. Run it and see the result in serial monitor, set the baudrate to 115200. It grab the html from outside, see the code then […]
Arduino Nano V3.0 + NRF24L01

This little board is nearly the same size as nano but embedded with a NRF24L01, and also very cheap $4 USD. To make it works: The “RF24 > Scanner” will works like below 100% compatible with Arduino nano
CLB and IOB design

altera and xilinx probably copying each other
Remote riscv-qemu gdb in vscode

3. Change the no of hart to 1 Result : Step over fully work
Programming Arduino using STK500 ISP

STK500 is better than MKII since it supports high voltage programming, it can reset fuses from any status. Step 1: Install the driver. Must be version from date 7th Oct Plug in the USB, if it detected wrong driver, update it by select specific folder’. Need reboot the computer to take effect. Step 2: connect […]
Programming Arduino using MKII ISP

I got MKII ISP from here. To program Arduino Nano via Microchip studio, nothing special, remember have to select the chip. And Nano D8 pin is B0. Nano bootloader can be found in here.
STM32 power up

Did it one more time and
Step to make icesugar 40 works

Simplest steps To make the RGB led work, put on these three jumpers
solder resistors to make oled change from spi to i2c

Arduino To make it work in Arduino, don’t use adafruit SSD1306, you have to use SSH110X library. Run the example, no need to modify anycode.
STM32 + OLED 0.96 4pins I2C, works

This video works https://www.youtube.com/watch?v=Mt6U30Yxrr8&t=311s , sample code is in here.
Arduino Nano IIS + Oled

this youtube works. Oled 0.91 and 0.96 inch both work. Oled can buy in here. The adafruit example is 128×32, need to change to 128×64 for 0.96 inch oled. One thing becareful, 0.96 oled 128×64, the address is still 0x3c, not 0x3d In Arduino IDE, change the address to “3C”, otherwise won’t work
We start building benblue computer

Teaching teenagers to understand logic

Teaching always sharpen my knowledge, fill up all the missing gap of my skill
Powerup STM32 by breadboard

I found something:
ATMega 328p use ext 16M oscilator

https://www.ee-diary.com/2021/06/how-to-program-atmega328p-using-atmel.html
Very good arduino uno clone

bought from here
Step to run icesugar-nano

Bought from here. user manual:           https://github.com/wuxx/icesugar-nano/blob/main/README.mdwin 7 serial driver:   https://github.com/wuxx/icesugar-nano/blob/main/doc/usbser.infsource and semantics:     https://github.com/wuxx/icesugar-nano Follow https://projectf.io/posts/building-ice40-fpga-toolchain/ . If you got this error: fatal error: ‘ftdi.h’ file not found, then modify config.mk in /Users/peter/workspace/icestorm: Edit /Users/peter/workspace/icestorm/iceprog/Makefile All examples in https://github.com/wuxx/icesugar-nano , just drag the demo program from demo folder or build it […]
Arduino check I2C addresses

This code can check I2C address from multiple devices
Arduino controls two 1602 LCD

One LCD need to set the jump at back to have another I2C address
ESP32 on arduino, simplest tutorial

Got this board from Taobao. Follow https://randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions. schematic:https://pan.baidu.com/s/1sNCK3Z4ZXfziKoF-ZYDMiw  Code:pxc4doc:https://pan.baidu.com/s/1SJFlgyIenaM4-TfmT1eLtQ  Code:NICE  or download here If you failed to run the code for this. Hold “Boot” button while uploading the code If you meet “the port doesn’t exist”, do:
STM32 – 自古成功在嘗試

STM32FEBKC6T6
STM32 controls 4 digits 8 segment led

MyFunction.c Control Code
01.54 OLED with STM32 example (7 pins)

Buy from here. Example is in here
Create a dummy driver for openocd

We are developing our own risc-v so we need to have to ability to modify openocd. Here is the quickest guide for you to start when you type “set $s1=0xaabb”, it will jump to here
Very small STM32 board

Buy from here https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8deFDqTo&id=630403001847&_u=bbuhab0778e , model is STM32F103C8T6
Basic tutorial for blinking led for STM32F411

Tutorial: Create the project Step 1: Open STM32IDE, create the project, choose the right MCU Step 2: Type in project name Step 3: This is project structure Step 4: LED is assign to PC13, set it to GPIO output Then it will generate the setup code Step 5: Blink the led in main, there is […]
SEMU call graph

This graph generated by graphviz, helping students easier understand Professor Jim Huang’s SEMU RISC-V emulator
好正嘅一本Logic書

講得好step by step
QEMU PLIC call map

After hacking the qemu risc-v source code, here is the PLIC call map
Export our data structure into logisim

Created the library to export our data structure into logisim, https://gitlab.com/quantr/eda/logisim-library , part of our EDA tool
Good HDL synthesis book

The first step of logic synthesis is call “HDL synthesis”, converting verilog into raw netlist. http://ebook.pldworld.com/_eBook/FPGA%EF%BC%8FHDL/-Eng-/Verilog%20HDL%20Synthesis.%20A%20Practical%20Primet%20%28Bhasker%29.pdf
Good book on logic synthesis

These two papers are referenced by above book about HDL translator
Cadence Install Guide

https://downloadly.net/2020/19/7490/03/cadence-ic/23/?#/7490-cadence-212315010314.htmlhttps://downloadly.net/2020/19/7490/03/cadence-ic/23/?#/7490-cadence-212315010314.html
ICESugar board unable to mount in ubuntu

If you unable to mount your icesugar board in ubuntu and saying this error “Not authorized to perform operation”, this link resolve it https://benjaminnl.pixnet.net/blog/post/4894925-ubuntu-%E8%A7%A3%E6%B1%BA%E9%9A%A8%E8%BA%AB%E7%A2%9F%E7%84%A1%E6%B3%95%E9%96%8B%E5%95%9F%EF%BC%9Anot-authorized-to-perfo The below board https://item.taobao.com/item.htm?_u=fbuhab0c863&id=631164799875 only work with the extension board on right hand side, the left hand side one dont. I found out the chip in the middle is different, rhs […]
Change qemu to use 16M ram for xv6-riscv

After testing, the minimal memory of xv6-riscv needed is 3MB
Very good micro python board

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.15412e8duBDI2J&id=645704746945&_u=mbuhab0da05
Tiny STM32 board (STM32F103C8T6)

https://item.taobao.com/item.htm?spm=a1z09.2.0.0.67002e8ddznHy0&id=630403001847&_u=gbuhab04cbb STM32F103C8T6
Generate verilator coverage report in html

Remark: https://aijishu.com/a/1060000000330400 brew install iconv or apt-get install lcov
好書推介

作者用第一身Manager嘅身份教你點謀劃一個ASIC項目