Example Code


Project: Amani Jack ‘O Lantern

Description: Fades 8 LED’s on and off via Pulse-Width Modulation. Demonstrates low pwm-count cutoff to stop LED blinking at the PWM lower end. Useful for Halloween!

Files: 101031 JackOmani
Platform: Amani 64, Kemani
Settings: Power Jumper: JP2, power from J6 or Arduino. JP5, JP6 = Any.
Interfaces: 8 External LEDs and resistors to DOCKA-D



Project: SRAM Expansion: 256KB

Description: Expand your Arduino’s SRAM by 256KB. This code demonstrates the Amani 64′s ability to modify serial data packets to address multiple devices without adding transfer time. The Arduino code is simple test code, library to come soon. Verilog code addresses eight devices; easily modified for more. Arduino test code addresses four, easily modified for more.

Files: Complete Project / Amani Files / Arduino Files
Platform: Amani 64, Arduino
Settings: Power Jumper: JP2, power from Arduino. JP5, JP6 = PB.
Interfaces: (4) 23K256 SRAM Chips Required. Arduino SPI Data via PB. SPI memory transfers via Docks A/B. Daisy chain MOSI, MISO, and SCLK. One nCS line per SRAM chip. For best results, do not daisy-chain power and ground, bring each line back to a DOCK Vcc and GND connection.



Project: 23K256 SRAM 8-Bit Transfers

Description: Expand your Arduino’s SRAM by 32KB. This code is more for the demonstration of parallel and serial data transfer techniques. It creates a parallel data bus between the Arduino and Amani 64 which can be modified to be serial instead. Demonstrates the Amani 64′s ability to create a logic bridge between the Arduino and serial memory devices that require specific SPI transfers not possible by the Arduino SPI port.

Files: Complete Project / Amani Files / Arduino Files
Platform: Amani 64, Arduino
Settings: Power Jumper: JP2, power from Arduino. JP5, JP6 = PB.
Interfaces: 23K256 SRAM Chip Required. Arduino Parallel Data via PB/PD. Arduino Serial Com. SPI memory transfers via Docks A/B.



Project: SPI PPORT Checkout

Description: The Arduino writes incremental data to the Amani via SPI. This byte is then returned to the Arduino via a parallel data transfer. A free-running counter on the Amani returns an incremental byte to the Arduino via SPI. Mainly for demonstration and test.

Files: Complete Project / Amani Files / Arduino Files
Platform: Amani 64 and Arduino
Settings: Power Jumper: JP2, power from Arduino. JP5, JP6 = PB0, PB1.
Interfaces: Amani64 stacked with Arduino. SPI data transfers via port PB[5..2]. Parallel data transfers via port PB[1..0],PD[7..2]. Serial communications via PD[1..0]



Project: 4DIG7SEG

Description: Demonstrates logic that drives a 4-digit seven segment display. Creates a basic digital clock. Best used with the MODsevseg module. Coming Soon.

Files: 4DIG7SEG
Platform: Amani 64, Kemani
Settings: Power Jumper: JP2, power from J6. JP5, JP6 = Any.
Interfaces: MODsevseg Module or 4-digit 7 seven-segment display. One stable 1 second clock source.



Project: Amani PWM LED

Description: Automatically fades an LED on and off via Pulse-Width Modulation. Pushing SW1 fades the LED to highest setting.

Files: 100819 Amani PWM LED
Platform: Amani 64, Kemani
Settings: Power Jumper: JP2, power from J6 or Arduino. JP5, JP6 = Any.
Interfaces: External LED and resistor to DOCKA3 (CPLD pin 4)



Project: Amani Blink

Description: Blinks a user-provide LED once per second.

Files: 100819 Amani Blink
Platform: Amani 64, Kemani
Settings: Power Jumper: JP2, power from J6 or Arduino. JP5, JP6 = Any. Interfaces: External LED and resistor to DOCKA3 (CPLD pin 4)