tiger_programmable_logic_card
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tiger_programmable_logic_card [2019/05/13 19:50] – [Clock] jon | tiger_programmable_logic_card [2019/06/20 08:20] – added presets 37-47 jon | ||
---|---|---|---|
Line 139: | Line 139: | ||
The list of presets available is shown in the table below. Additional presets can be easily added upon request. BNC outputs are push-pull unless otherwise specified. | The list of presets available is shown in the table below. Additional presets can be easily added upon request. BNC outputs are push-pull unless otherwise specified. | ||
- | ^ Preset | + | ^ Preset |
| 0 | All cells set to constant 0 | 1-16 | - | 3.00+ | | | | 0 | All cells set to constant 0 | 1-16 | - | 3.00+ | | | ||
| 1 | Simulate original SPIM TTL card | - | BNC1-4 | | 1 | Simulate original SPIM TTL card | - | BNC1-4 | ||
Line 177: | Line 177: | ||
| 35 | BNC3 source from cell 11 | - | BNC3 | 3.23+ | output clock on BNC3 | | | 35 | BNC3 source from cell 11 | - | BNC3 | 3.23+ | output clock on BNC3 | | ||
| 36 | cell 10 set to reflect cell 8 | 10 | - | 3.27+ | use shutter logic without micro-mirror TTL1 signal | | 36 | cell 10 set to reflect cell 8 | 10 | - | 3.27+ | use shutter logic without micro-mirror TTL1 signal | ||
+ | | 37 | BNC1 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 38 | BNC2 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 39 | BNC3 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 40 | BNC4 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 41 | BNC5 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 42 | BNC6 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 43 | BNC7 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 44 | BNC2 and BNC4 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 45 | BNC3 and BNC5 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 46 | BNC4 and BNC6 selected, turned on by cell 10 | - | BNC1-7 | ||
+ | | 47 | BNC2 and BNC4 and BNC6 selected, turned on by cell 10 | - | BNC1-7 | ||
==== Accessing outputs over serial ==== | ==== Accessing outputs over serial ==== | ||
Line 232: | Line 243: | ||
==== Clock ==== | ==== Clock ==== | ||
- | To create a free-running clock with user-selectable period and duty cycle you can combine two non-retriggerable one-shot cells. | + | To create a free-running clock with user-selectable period and duty cycle you can combine two non-retriggerable one-shot cells. |
- | --> Script: clock signal on BNC1 output # | + | --> Script: clock signal on BNC3 output # |
<code java> | <code java> | ||
// generate a clock signal based on the internal 4kHz clock, e.g. for triggering a camera | // generate a clock signal based on the internal 4kHz clock, e.g. for triggering a camera | ||
- | // currently hard-codes using cells 1 and 2 and BNC output #1 | + | // currently hard-codes using cells 1 and 2 and BNC output #3 |
// variables to be edited by user | // variables to be edited by user | ||
- | double clockFrequencyHz = 100.0; // clock frequency in Hertz | + | double clockFrequencyHz = 100; // clock frequency in Hertz |
double clockDutyCycle = 0.5; // should be between 0 and 1 exclusive | double clockDutyCycle = 0.5; // should be between 0 and 1 exclusive | ||
Line 258: | Line 269: | ||
int addrEdge = 128; | int addrEdge = 128; | ||
double ticsPerSecond = 4000.0; | double ticsPerSecond = 4000.0; | ||
- | int addrOutputBNC1 | + | int addrOutputBNC3 |
- | int addrOneShotClk | + | int addrDelayNRT |
- | int addrOneShotOut | + | int addrOneShot |
// figure out the cycle period and high period in terms of PLC " | // figure out the cycle period and high period in terms of PLC " | ||
- | int clockPeriodTics = (int) (ticsPerSecond/ | + | int clockPeriodTics = (int) (ticsPerSecond/ |
- | int clockHighTics = (int) (clockPeriodTics * clockDutyCycle) | + | print(" |
+ | int clockHighTics = (int) (clockPeriodTics * clockDutyCycle); | ||
// turn off updates to speed communication | // turn off updates to speed communication | ||
Line 270: | Line 282: | ||
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
- | // do programming of one-shot cells | + | // do programming of one-shot |
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
// connect to BNC output | // connect to BNC output | ||
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
- | mmc.setProperty(plcName, | + | mmc.setProperty(plcName, |
// restore updates | // restore updates | ||
mmc.setProperty(plcName, | mmc.setProperty(plcName, | ||
+ | |||
+ | |||
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
tiger_programmable_logic_card.txt · Last modified: 2024/02/06 14:25 by jon