PEmicro Cyclones feature "Cyclone Programming Control Port" functionality via the 10-pin expansion I/O interface on the Cyclone, which allows external signal control of programming operations. The Cyclone Programming Control Port may be used to launch programming as well as read the IDLE/BUSY state of the cyclone and the SUCCESS/ERROR result of the last programming operation. The port I/O operates from 1.6v-5.5v. These signals can be interfaced to by ATE (Automated Test Equipment), external buttons / LEDs, microcontrollers, etc. A Raspberry Pi control example, as well as a simple button/LED control example, are shown below. Note that using the Programming Control Port is just one of many ways to control programming of the Cyclone, which include: The Programming Control Port pinout is shown here. To align Pin 1 with the Cyclone port, rotate 90 degrees clockwise: The functionality of each signal is described here : To allow the Cyclone to drive the port outputs to show the current programming state, and to allow the Cyclone to properly interpret input signals on the port, the Programming Control Port I/O voltage must be set. This is done by connecting an external voltage of 1.6v-5.5v to the VCCIO_IN pin of the port. This VCCIO_IN pin may be directly connected to the PWR_5V_OUT output pin of the Programming Control Port if 5v operation of the port is desired. If connecting to external circuitry which runs at a different voltage, such a 3v, simply connect the desired voltage to the VCCIO_IN pin. Once powered, the outputs (~SUCCESS_OUT, ~ERROR_OUT, and ~IDLE_OUT) become actively driven. The Programming Control Port allows programming to be launched from the Programming Control Port. For this to happen, the triggering must previously have been enabled in the settings of the Cyclone (see below) and the port must be detected as active. The Programming Control Port is considered active if there is an appropriate voltage applied to the VCCIO_IN pin and the ~SENSE_IN signal is driven low. To enable trigger in the settings of the Cyclone, the “controlporttriggerenable” property in the Cyclone must have been enabled at some point (this setting is stored in the Cyclone once set). This can be done via the Cyclone Control SDK, Cyclone Control Console, or Cyclone Control GUI. For the Cyclone Control Console, an example command which reads this property for a Cyclone named “Universal_PEM0927F6” is (all in a single line): For the Cyclone Control Console, an example command which sets this property for a Cyclone named “Universal_PEM0927F6” is: In the Cyclone Control GUI, this property may be accessed by opening the Cyclone and choosing the “Properties” tab: To set the property, highlight it and click the … button on that line. Enter the value 1 to enable and 0 to disable triggering The triggering should then show as active (note that ~SENSE_IN will also need to be driven low for triggering to work): In its default idle state, the Cyclone will drive the ~IDLE_OUT signal low. When a falling edge is detected on the ~START_IN signal, the ~SUCCESS_OUT and ~ERROR_OUT signals will be driven high and then the ~IDLE_OUT signal will be driven high (BUSY). Once programming is complete, the ~SUCCESS_OUT and ~ERROR_OUT signals will be driven to reflect the result of programming and then the ~IDLE_OUT signal will be driven back low. The following mechanisms describe ways in which intelligent control circuitry, such as ATE systems, can interact with the Cyclone Programming Control Port to control the programming process. A mechanism to launch programming on the Cyclone if controlled by edge sensitive control equipment: A mechanism to launch programming on the Cyclone without using edge sensitive control equipment (polled method): This following example circuit has a push button that triggers programming. The three LEDs show the Success, Failure, and Idle/Busy lines. After setting up the above connections, pushing the button will trigger programming and the Cyclone state can be seen on the LEDs. This example uses a Raspberry Pi to launch programming, wait for programming completion, and then display a string indicating success or failure of the operation. A Raspberry Pi 4 Model B, monitor, keyboard, mouse and wire connectors are needed for the example. Set up the Raspberry Pi and connect it to monitor, keyboard and mouse. It should also be connected to the Programming Control Port in this way: IDLE OUT(Pin9) GPIO 17(Pin11) Running the following Python application on the Raspberry Pi will trigger programming, wait for the programming to complete, and then read and display whether the programming was successful or a failure. Programming Control Port – Pinout and Definition
Powering the Programming Control Port
Enabling Triggering on the Programming Control Port
cycloneControlConsole -cyclone=Universal_PEM0927F6 -getproperty=hardwareproperties,0,controlporttriggerenable
cycloneControlConsole -cyclone=Universal_PEM0927F6 -setproperty=hardwareproperties,0,controlporttriggerenable,1
Timing on the Programmming Control Port
Push Button / LED Example Circuit
Raspberry Pi Example
VCCIO IN(Pin3) 3V3(Pin1) GND(Pin2) GND(Pin6) SENSE IN(Pin10) GND(Pin9) START IN(Pin6) GPIO 18(Pin12) SUCCESS OUT(Pin7) GPIO 14(Pin8) ERROR OUT(Pin8) GPIO 15(Pin10) import RPi.GPIO as GPIO
import time
SuccessPin = 8
ErrorPin = 10
IdlePin = 11
StartPin = 12
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD) # Use physical pin numbering
GPIO.setup(SuccessPin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(ErrorPin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(IdlePin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
GPIO.setup(StartPin, GPIO.OUT, initial=1)
if GPIO.input(IdlePin) == 0:
GPIO.add_event_detect(IdlePin, GPIO.FALLING)
print ("Executing...")
GPIO.output(StartPin, 0) #trigger programming
GPIO.output(StartPin, 1)
while not (GPIO.event_detected(IdlePin)):
time.sleep(0.01)
if GPIO.input(SuccessPin) == 0:
print("Success")
elif GPIO.input(ErrorPin) == 0:
print("Error")
else:
print("Unable to read programming result")
else:
print ("Cyclone is Busy. Programming not launched.")
GPIO.cleanup()