Related lists

Description

Do you love the Raspberry Pi as much as we do? Do you wish it had some features that are in an Arduino? How about adding some Analog inputs or outputs? What about consistent I/O timing so that you can interface to devices like NeoPixels? Wouldn't having some 5V I/O be wonderful for some of those legacy interfaces?

If that sounds interesting to you, then this is the Raspberry Pi hat that you need. This card sits on your Raspberry Pi and provides an incredible number of features.

Details

Features

Cypress Semiconductor PSOC 5LP part CY8C5267AXI-LP051

Core: ARM Cortex M3

Data Bus Width: 32 bit

Maximum Clock Frequency: 67 MHz

Program Memory Size: 128 kB

Data RAM Size: 32 kB

ADC Resolution: 12 bit

Data RAM Type: SRAM

Interface Type: I2C

Number of ADC Channels: 1

Number of I/Os: 72

I/O
Number of Timers/Counters: 4

Timer
Program Memory Type: Flash

Works on all Raspberry Pi cards with 40 pin GPIO (A+/B+/Pi2/Pi3/Zero)

All 29 Raspberry Pi I/O lines are connected to the PSOC

Configuration EEPROM

LED (see below for details)

Fuses on 3.3V and 5V power

Two I/O connectors
14 + 16 = 30 I/O pins

Each of the two I/O connectors can be 3.3V or 5V

What is a PSOC?

It is a Programmable
System on a Chip. The beauty of the Cypress part is that it includes
both analog and digital logic which can be programmed to be whatever you
want it to be. In addition, you get a 32-bit ARM processor.

This frees you
to re-route signals to user selected pins, shedding the constraints of a
fixed-peripheral controller. In addition, global buses allow for signal
multiplexing and logic operations, eliminating the need for a
complicated digital-logic gate design.

Configurable Analog and Digital Blocks

The combination of
configurable analog and digital circuitry is the basis of the PSoC
platform. You configure these blocks using pre-built library functions
or by creating your own. By combining several digital blocks, you can
create 16-, 24-, or even 32-bit wide logic resources. The analog blocks
are composed of an assortment of switch capacitor, op-amp, comparator,
ADC, DAC, and digital filter blocks, allowing complex analog signal
flows.

Example Programming Files

It's a silly question since there are dozens of ways. But here's a few.

"Wire" the LED from the PSOC chip to one of the GPIO lines from the
Pi. For this one, the Pi flashes the LED under program control.

Program the ARM processor to blink the LED. This is like the
familiar Arduino Blink Sketch and it runs independently from the
Raspberry Pi.

Use a Hardware counter on the PSOC and output the counter most significant bit to the LED.

Here's an out of the box idea. Configure the PSOC to generate a sine
wave and add a comparator to check the level of the sine wave. Route
the comparator output to the LED.

How about blinking an LED while a button is pressed by using both hardware and the PSOC's CPU?

Here's the schematic:

Here's the code.

What's going on with the 30 LEDs in the video?

That's
another simple design.It consists of two counters that are running at 1
Hz. Each of the counters has the same clock but one counts to 14 and the
other counts to 16. The output of the counter is sent to a
de-multiplexer which takes the 4 bit count and lights each light one at a
time.