UP Squared GPIO Counter

您所在的位置:网站首页 nrfconnect UP Squared GPIO Counter

UP Squared GPIO Counter

#UP Squared GPIO Counter | 来源: 网络整理| 查看: 265

Building and Running

Build the sample in the following way:

# From the root of the zephyr repository west build -b up_squared samples/boards/up_squared/gpio_counter

Prepare the boot device (USB storage drive) as described for the UP Squared board. Insert the USB boot device containing the prepared software binary of the sample.

Connect the board to a host computer and open a serial connection for serial console interface:

$ minicom -D -b 115200

Replace with the port where the UP Squared board can be found. For example, under Linux, /dev/ttyUSB0. The -b option sets baud rate.

Power On the board. The board will boot then enter GRUB boot loader unless BIOS option is selected. Enter the BIOS configuration menu, modify the required HAT configurations (above) and then select to save the BIOS settings and reset.

The board will reboot and then enter GRUB boot loader. Select to boot Zephyr and the board will start to execute the sample. Apply input to trigger the increment of the value of the counter.

There are several ways to observe the sample behavior in addition to serial console display of the counter value. For example, the input signal can be implemented with an analog button on a breakout breadboard, or with a basic pulse provided by a GPIO output (active High) pin of another GPIO device (eg Arduino Uno). The Up Squared GPIO output signals can each be connected to a simple LED circuit on a breakout breadboard to illuminate the 4-bit counter value, as shown in the example below:

o----> to Up Squared | GPIO Output Pin _|_ \ / --- | R1 | +---> GND


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3