CSCE 462

This historical page is no longer current. Students enrolled in CSCE 462 should refer to ecampus portal for most current lab schedule.

Lab 1: PSoC Introduction and LCD

Show the numbers 0-9 across the LCD one afte the other: the numbers should move from left to right, display only one number at a time, and set the moving frequency to be one number per second. After 9 has been reached, relocate the curser to leftmost and repeat the procedure.

Resources:

CY8CKIT-050_User_Guide

CY8CKIT-050_Quick Start_Guide

CY8CKIT-050_Schematic

LCD_sample_code

Lab 2: Waveform detection

Detect a waveform (frequency 500 Hz, high peak voltage 4.5V, low peak voltage 0.5V) generated by a function generator and display the corresponding type (triangle or square) on LCD.

Resources:

ADC_DelSig_v2_30

cy_pins_v1_70

ADC_sample_code

Lab 3: DAC waveform generation

Use the DAC module of PSoC 5 to generate a triangle waveform with low-peak voltage of 0V and high-peak voltage of 1V, and its frequency should be changing according to the position of the potential meter. The waveform should be of lowest frequency when the potential meter is in most left position, and fastest frequency when it is in most right position.

Resources:

VDAC8_v1_80

Lab 4: PSoC Interrupts 1

Using interrupts to implement two button functions such that:

  • At system initialization, LED3 and LED4 are lit.
  • When SW2 is being held down, LED4 should blink with 0.5 second interval. When SW2 is released, LED4 should be always lit.
  • When SW3 is being held down, LED3 should blink with 1 second interval. When SW3 is released, LED3 should be always lit.
  • When both SW2 and SW3 are held down, both LED3 and LED4 should blink with their corresponding frequency.
  • When neither SW2 nor SW3 is pressed, both LED3 and LED4 should restore to the system initial state.
  • The 0.5 and 1 second interval should be implemented using Timer and interrupt, not CyDelay. The detection of press/release of buttons should be interrupt driven, not busy polling.

Resources:

Timer_v2_30

cy_isr_v1_60

cy_pins_v1_70

interrupts

notes

sample code_1

Lab 5: PSoC Interrupts 2

Using interrupts to implement two button functions such that

  • At system initialization, LCD should print “In main program” on row 0 of the LCD.
  • At the falling edge of SW2 (i.e., when it is pressed), LCD should print “In sw2_isr” on row 0, and count from 0 to 9 at 0.5 second interval on row 1 column 1. After the counting completes, it should return to main program.
  • At the falling edge of SW3, LCD should print “In sw3_isr” on row 0, and count from 0 to 9 at 1 second interval on row 1 column 2. After the counting completes, it should return to main program.
  •  SW2 should have higher priority over SW3 such that when sw3_isr is executing and SW2 is pressed, the system should jump to sw2_isr and process it first. However, if sw2_isr is executing and SW3 is pressed, the system should continue processing sw2_isr and will handle sw3_isr after it finishes sw2_isr.
  • You can implement the 0.5 and 1 second interval using CyDelay. The detection of press of buttons should be interrupt driven, not busy polling.

Resources:

psoc5_architecture

Lab 6: MOSFET

Use MOSFET to construct an H-bridge circuit, and use PSoC to control the MOSFET such that when SW2 is pressed, the DC motor should toggle its rotating direction.

Resources:

stp150n3llh6

Lab 7: FPGA Introduction 1

Light up the LEDs on the FPGA board sequentially from left to right with interval of 0.5 second. When the rightmost LED is on, in the next cycle the leftmost one should be lighted up and the same procedure is repeated. Also implement the function of a button which can toggle the moving direction of LEDs when pressed and released (i.e., not held).

Resources:

decoder

fpga_intro

sample code

verilog_tutorial

Spartan-3E Starter Kit User Guide

Lab 8: FPGA Introduction 2

Implement a 4-bit counter using LED3, LED2, LED1 and LED0. The counter is initialized to 0000, and increment by 1 in a time interval t, where t is determined by SW1 and SW0. When (SW1,SW0)=(0,0), t = 0.5 second; when (SW1,SW0)=(0,1), t = 1 second; when (SW1,SW0)=(1,0), t = 2 seconds; when (SW1,SW0)=(1,1), t = 4 seconds. After the counter reaches 1111, it should be reset to 0000, and repeat the above procedure. Whenever the configuration of (SW1,SW0) changes, the counter should increment under the new time interval.

Leave a Reply