- Datasheets
- Accessories
- CB15
- CB25
- CB37 V1.2
- CB37 V2.1
- EB37
- EI-1022
- EI-1034
- EI-1040
- EI-1050
- IDCA-10
- LJTick-CurrentShunt
- LJTick-DAC
- LJTick-DAC Testing Utility
- LJTick-DigitalOut5V
- LJTick-Divider
- LJTick-InAmp
- LJTick-InBuff
- LJTick-LVDigitalIO
- LJTick-OutBuff
- LJTick-Proto
- LJTick-RelayDriver
- LJTick-Resistance
- LJTick-VRef
- Mux80 AIN Expansion Board
- PS12DC
- RB12
- RB16
- T-Series Datasheet
- Preface: Warranty, Liability, Compliance
- 1.0 Device Overview
- 2.0 Installation
- 3.0 Communication
- 4.0 Hardware Overview
- 5.0 USB
- 6.0 Ethernet
- 7.0 WiFi (T7-Pro only)
- 8.0 LEDs
- 9.0 VS, Power Supply
- 10.0 SGND and GND
- 11.0 SPC
- 12.0 200uA and 10uA (T7 Only)
- 13.0 Digital I/O
- 13.1 Flexible I/O (T4 Only)
- 13.2 DIO Extended Features
- 13.2.1 EF Clock Source
- 13.2.2 PWM Out
- 13.2.3 PWM Out with Phase
- 13.2.4 Pulse Out
- 13.2.5 Frequency In
- 13.2.6 Pulse Width In
- 13.2.7 Line-to-Line In
- 13.2.8 High-Speed Counter
- 13.2.9 Interrupt Counter
- 13.2.10 Interrupt Counter with Debounce
- 13.2.11 Quadrature In
- 13.2.12 Interrupt Frequency In
- 13.2.13 Conditional Reset
- 13.3 I2C
- 13.4 SPI
- 13.5 SBUS
- 13.6 1-Wire
- 13.7 Asynchronous Serial
- 14.0 Analog Inputs
- 15.0 DAC
- 16.0 DB37 (T7 Only)
- 17.0 DB15
- 18.0 Internal Temp Sensor
- 19.0 RTC (T7 Only)
- 20.0 Internal Flash
- 21.0 SD Card (T7 Only)
- 22.0 OEM Versions
- 23.0 Watchdog
- 24.0 IO Config, _DEFAULT
- 25.0 Lua Scripting
- Appendix A - Specifications
- Appendix B - Drawings and CAD Models
- Appendix C - Firmware Revision History
- Appendix D - Packaging Information
- Appendix E - Software Options
- U3 Datasheet
- Preface
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Status LED
- 2.3 - GND and SGND
- 2.4 - VS
- 2.5 - Flexible I/O (FIO/EIO)
- 2.6 - AIN
- 2.6.1 - Channel Numbers
- 2.6.2 - Converting Binary Readings to Voltages
- 2.6.3 - Typical Analog Input Connections
- 2.6.3.1 - Signal from the LabJack
- 2.6.3.2 - Unpowered Isolated Signal
- 2.6.3.3 - Signal Powered By the LabJack
- 2.6.3.4 - Signal Powered Externally
- 2.6.3.5 - Amplifying Small Signal Voltages
- 2.6.3.6 - Signal Voltages Beyond 0-2.44 Volts (and Resistance Measurement)
- 2.6.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.6.3.8 - Floating/Unconnected Inputs
- 2.6.3.9 - Signal Voltages Near Ground
- 2.6.4 - Internal Temperature Sensor
- 2.7 - DAC
- 2.8 - Digital I/O
- 2.9 - Timers/Counters
- 2.9.1 - Timer Mode Descriptions
- 2.9.1.1 - PWM Output (16-Bit, Mode 0)
- 2.9.1.2 - PWM Output (8-Bit, Mode 1)
- 2.9.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.9.1.4 - Duty Cycle Measurement (Mode 4)
- 2.9.1.5 - Firmware Counter Input (Mode 5)
- 2.9.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.9.1.7 - Frequency Output (Mode 7)
- 2.9.1.8 - Quadrature Input (Mode 8)
- 2.9.1.9 - Timer Stop Input (Mode 9)
- 2.9.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.9.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.9.1.12 - Line-to-Line Measurement (Mode 14)
- 2.9.2 - Timer Operation/Performance Notes
- 2.9.1 - Timer Mode Descriptions
- 2.10 - SPC (… and SCL/SDA/SCA)
- 2.11 - DB15
- 2.12 - U3-OEM
- 2.13 - Hardware Revision Notes
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Low-Level Functions
- 5.2.1 - Bad Checksum
- 5.2.2 - ConfigU3
- 5.2.3 - ConfigIO
- 5.2.4 - ConfigTimerClock
- 5.2.5 - Feedback
- 5.2.5.1 - AIN: IOType = 1
- 5.2.5.2 - WaitShort: IOType=5
- 5.2.5.3 - WaitLong: IOType=6
- 5.2.5.4 - LED: IOType=9
- 5.2.5.5 - BitStateRead: IOType=10
- 5.2.5.6 - BitStateWrite: IOType=11
- 5.2.5.7 - BitDirRead: IOType=12
- 5.2.5.8 - BitDirWrite: IOType=13
- 5.2.5.9 - PortStateRead: IOType=26
- 5.2.5.10 - PortStateWrite: IOType=27
- 5.2.5.11 - PortDirRead: IOType=28
- 5.2.5.12 - PortDirWrite: IOType=29
- 5.2.5.13 - DAC# (8-bit): IOType=34,35
- 5.2.5.14 - DAC# (16-bit): IOType=38,39
- 5.2.5.15 - Timer#: IOType=42,44
- 5.2.5.16 - Timer#Config: IOType=43,45
- 5.2.5.17 - Counter#: IOType=54,55
- 5.2.5.18 - Buzzer: IOType=63
- 5.2.6 - ReadMem (ReadCal)
- 5.2.7 - WriteMem (WriteCal)
- 5.2.8 - EraseMem (EraseCal)
- 5.2.9 - Reset
- 5.2.10 - StreamConfig
- 5.2.11 - StreamStart
- 5.2.12 - StreamData
- 5.2.13 - StreamStop
- 5.2.14 - Watchdog
- 5.2.15 - SPI
- 5.2.16 - AsynchConfig
- 5.2.17 - AsynchTX
- 5.2.18 - AsynchRX
- 5.2.19 - I²C
- 5.2.20 - SHT1X
- 5.2.21 - SetDefaults (SetToFactoryDefaults)
- 5.2.22 - ReadDefaults (ReadCurrent)
- 5.2.23 - 1-Wire
- 5.3 - Errorcodes
- 5.4 - Calibration Constants
- Appendix A - Specifications
- Appendix B - Enclosure and PCB Drawings
- U3 Firmware Revision History
- U6 Datasheet
- Preface: Warranty, Liability, Compliance
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Power and Status LED
- 2.3 - GND and SGND
- 2.4 - VS
- 2.5 - 10UA and 200UA
- 2.6 - AIN
- 2.6.1 - Channel Numbers
- 2.6.2 - Converting Binary Readings to Voltages
- 2.6.3 - Typical Analog Input Connections
- 2.6.3.1 - Signal from the LabJack
- 2.6.3.2 - Unpowered Isolated Signal
- 2.6.3.3 - Signal Powered By the LabJack
- 2.6.3.4 - Signal Powered Externally
- 2.6.3.5 - Amplifying Small Signal Voltages
- 2.6.3.6 - Signal Voltages Beyond ±10 Volts (and Resistance Measurement)
- 2.6.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.6.3.8 - Floating/Unconnected Inputs
- 2.6.4 - Internal Temperature Sensor
- 2.6.5 - Signal Range
- 2.7 - DAC
- 2.8 - Digital I/O
- 2.9 - Timers/Counters
- 2.9.1 - Timer Mode Descriptions
- 2.9.1.1 - PWM Output (16-Bit, Mode 0)
- 2.9.1.2 - PWM Output (8-Bit, Mode 1)
- 2.9.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.9.1.4 - Duty Cycle Measurement (Mode 4)
- 2.9.1.5 - Firmware Counter Input (Mode 5)
- 2.9.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.9.1.7 - Frequency Output (Mode 7)
- 2.9.1.8 - Quadrature Input (Mode 8)
- 2.9.1.9 - Timer Stop Input (Mode 9)
- 2.9.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.9.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.9.1.12 - Line-to-Line Measurement (Mode 14)
- 2.9.2 - Timer Operation/Performance Notes
- 2.9.1 - Timer Mode Descriptions
- 2.10 - SPC (or VSPC)
- 2.11 - DB37
- 2.12 - DB15
- 2.13 - OEM Connector Options
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Low-Level Functions
- 5.2.1 - Bad Checksum
- 5.2.2 - ConfigU6
- 5.2.3 - ConfigIO
- 5.2.4 - ConfigTimerClock
- 5.2.5 - Feedback
- 5.2.5.1 - AIN: IOType = 1
- 5.2.5.2 - AIN24: IOType = 2
- 5.2.5.3 - AIN24AR: IOType = 3
- 5.2.5.4 - WaitShort: IOType=5
- 5.2.5.5 - WaitLong: IOType=6
- 5.2.5.6 - LED: IOType=9
- 5.2.5.7 - BitStateRead: IOType=10
- 5.2.5.8 - BitStateWrite: IOType=11
- 5.2.5.9 - BitDirRead: IOType=12
- 5.2.5.10 - BitDirWrite: IOType=13
- 5.2.5.11 - PortStateRead: IOType=26
- 5.2.5.12 - PortStateWrite: IOType=27
- 5.2.5.13 - PortDirRead: IOType=28
- 5.2.5.14 - PortDirWrite: IOType=29
- 5.2.5.15 - DAC# (8-bit): IOType=34,25
- 5.2.5.16 - DAC# (16-bit): IOType=38,39
- 5.2.5.17 - Timer#: IOType=42,44,46,48
- 5.2.5.18 - Timer#Config: IOType = 43, 45, 47, 49
- 5.2.5.19 - Counter#: IOType = 54, 55
- 5.2.6 - ReadMem (ReadCal)
- 5.2.7 - WriteMem (WriteCal)
- 5.2.8 - EraseMem (EraseCal)
- 5.2.9 - SetDefaults (SetToFactoryDefaults)
- 5.2.10 - ReadDefaults (ReadCurrent)
- 5.2.11 - Reset
- 5.2.12 - StreamConfig
- 5.2.13 - StreamStart
- 5.2.14 - StreamData
- 5.2.15 - StreamStop
- 5.2.16 - Watchdog
- 5.2.17 - SPI
- 5.2.18 - AsynchConfig
- 5.2.19 - AsynchTX
- 5.2.20 - AsynchRX
- 5.2.21 - I²C
- 5.2.22 - SHT1X
- 5.2.23 - 1-Wire
- 5.2.24 - StreamAddChannels
- 5.3 - Errorcodes
- 5.4 - Calibration Constants
- Appendix A - Specifications
- Appendix B - Noise and Resolution Tables
- Appendix C - Enclosure and PCB Drawings
- U6 Firmware Revision History
- Digit Datasheet (Discontinued)
- UE9 Datasheet
- Preface
- 1 - Installation
- 2 - Hardware Description
- 2.1 - USB
- 2.2 - Ethernet
- 2.3 - Vext (Screw Terminals and Power Jack)
- 2.4 - Comm and Control LEDs
- 2.5 - GND and SGND
- 2.6 - VS
- 2.7 - AIN
- 2.7.1 - Channel Numbers
- 2.7.2 - Converting Binary Readings to Voltages
- 2.7.3 - Typical Analog Input Connections
- 2.7.3.1 - Signal from the LabJack
- 2.7.3.2 - Unpowered Isolated Signal
- 2.7.3.3 - Signal Powered by the LabJack
- 2.7.3.4 - Signal Powered Externally
- 2.7.3.5 - Amplifying Small Signal Voltages
- 2.7.3.6 - Signal Voltages Beyond ±5 Volts (and Resistance Measurement)
- 2.7.3.7 - Measuring Current (Including 4-20 mA) with a Resistive Shunt
- 2.7.3.8 - Floating/Unconnected Inputs
- 2.7.4 - Internal Temperature Sensor
- 2.8 - DAC
- 2.9 - Digital I/O
- 2.10 - Timers/Counters
- 2.10.1 - Timer Mode Descriptions
- 2.10.1.1 - PWM Output (16-Bit, Mode 0)
- 2.10.1.2 - PWM Output (8-Bit, Mode 1)
- 2.10.1.3 - Period Measurement (32-Bit, Modes 2 & 3)
- 2.10.1.4 - Duty Cycle Measurement (Mode 4)
- 2.10.1.5 - Firmware Counter Input (Mode 5)
- 2.10.1.6 - Firmware Counter Input With Debounce (Mode 6)
- 2.10.1.7 - Frequency Output (Mode 7)
- 2.10.1.8 - Quadrature Input (Mode 8)
- 2.10.1.9 - Timer Stop Input (Mode 9)
- 2.10.1.10 - System Timer Low/High Read (Modes 10 & 11)
- 2.10.1.11 - Period Measurement (16-Bit, Modes 12 & 13)
- 2.10.2 - Timer Operation/Performance Notes
- 2.10.1 - Timer Mode Descriptions
- 2.11 - SCL and SDA (or SCA)
- 2.12 - DB37
- 2.13 - DB15
- 2.14 - OEM Connector Options
- 3 - Operation
- 4 - LabJackUD High-Level Driver
- 4.1 - Overview
- 4.2 - Function Reference
- 4.2.1 - ListAll()
- 4.2.2 - OpenLabJack()
- 4.2.3 - eGet() and ePut()
- 4.2.4 - eAddGoGet()
- 4.2.5 - AddRequest()
- 4.2.6 - Go()
- 4.2.7 - GoOne()
- 4.2.8 - GetResult()
- 4.2.9 - GetFirstResult() and GetNextResult()
- 4.2.10 - DoubleToStringAddress()
- 4.2.11 - StringToDoubleAddress()
- 4.2.12 - StringToConstant()
- 4.2.13 - ErrorToString()
- 4.2.14 - GetDriverVersion()
- 4.2.15 - TCVoltsToTemp()
- 4.2.16 - ResetLabJack()
- 4.2.17 - eAIN()
- 4.2.18 - eDAC()
- 4.2.19 - eDI()
- 4.2.20 - eDO()
- 4.2.21 - eTCConfig()
- 4.2.22 - eTCValues()
- 4.3 - Example Pseudocode
- 4.3.1 - Open
- 4.3.2 - Configuration
- 4.3.3 - Analog Inputs
- 4.3.4 - Analog Outputs
- 4.3.5 - Digital I/O
- 4.3.6 - Timers & Counters
- 4.3.7 - Stream Mode
- 4.3.8 - Raw Output/Input
- 4.3.9 - Easy Functions
- 4.3.10 - SPI Serial Communication
- 4.3.11 - I²C Serial Communication
- 4.3.12 - Asynchronous Serial Communication
- 4.3.13 - Watchdog Timer
- 4.3.14 - Miscellaneous
- 4.4 - Errorcodes
- 5 - Low-level Function Reference
- 5.1 - General Protocol
- 5.2 - Comm Functions
- 5.3 - Control Functions
- 5.3.1 - BadChecksum
- 5.3.2 - ControlConfig
- 5.3.3 - Feedback (and FeedbackAlt)
- 5.3.4 - SingleIO
- 5.3.5 - TimerCounter
- 5.3.6 - StreamConfig
- 5.3.7 - StreamStart
- 5.3.8 - StreamData
- 5.3.9 - StreamStop
- 5.3.10 - ReadMem
- 5.3.11 - WriteMem
- 5.3.12 - EraseMem
- 5.3.13.1 - WatchdogConfig
- 5.3.13.2 - WatchdogRead
- 5.3.13.3 - Extended WatchdogConfig
- 5.3.13.4 - WatchdogClear
- 5.3.15 - Reset
- 5.3.16 - SPI
- 5.3.17 - AsynchConfig
- 5.3.18 - AsynchTX
- 5.3.19 - AsynchRX
- 5.3.20 - I²C
- 5.3.21 - SHT1X
- 5.3.22 - StreamDAC
- 5.3.23 - SetDefaults (SetToFactoryDefaults)
- 5.3.24 - ReadDefaults (ReadCurrent)
- 5.3.25 - 1-Wire
- 5.4 - Low-Level Errorcodes
- 5.5 - Modbus
- 5.6 - Calibration Constants
- 6 - Low-level Native Examples
- Appendix A - Specifications
- Appendix B - Noise and Resolution Tables
- Appendix C - Enclosure and PCB Drawings
- UE9 Firmware Revision History
- U12 Datasheet
- 1 - Installation
- 2 - Hardware Description
- 3 - Example Applications
- 4 - Programming Reference
- 4.1 - EAnalogIn
- 4.2 - EAnalogOut
- 4.3 - ECount
- 4.4 - EDigitalIn
- 4.5 - EDigitalOut
- 4.6 - AISample
- 4.7 - AIBurst
- 4.8 - AIStreamStart
- 4.9 - AIStreamRead
- 4.10 - AIStreamClear
- 4.11 - AOUpdate
- 4.12 - AsynchConfig
- 4.13 - Asynch
- 4.14 - BitsToVolts
- 4.15 - VoltsToBits
- 4.16 - Counter
- 4.17 - DigitalIO
- 4.18 - GetDriverVersion
- 4.19 - GetErrorString
- 4.20 - GetFirmwareVersion
- 4.21 - GetWinVersion
- 4.22 - ListAll
- 4.23 - LocalID
- 4.24 - NoThread
- 4.25 - PulseOut
- 4.26 - PulseOutStart
- 4.27 - PulseOutFinish
- 4.28 - PulseOutCalc
- 4.29 - ReEnum
- 4.30 - Reset (or ResetLJ)
- 4.31 - SHT1X
- 4.32 - SHTComm
- 4.33 - SHTCRC
- 4.34 - Synch
- 4.35 - Watchdog
- 4.36 - ReadMem
- 4.37 - WriteMem
- 4.38 - BuildOptionBits (ActiveX only)
- 4.39 - FourPack (ActiveX only)
- 4.40 - Description of Errorcodes
- 5 - Low-Level Function Reference
- Appendix A - Specifications
- Appendix B - Dimensions
- Appendix C - U12 Hardware Troubleshooting
- Appendix D - Maximum Data Rates for the LabJack U12
- Accessories
11 comments
Would you please put this
Would you please put this on my wish list for the Holidays:
New PWM function with 2 Parameters:
#1 a base frequency count for the Off time
#2 a base frequency count for the On time
This would save all my problems to obtain two jitter free signals in synch.
┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌┐┌
┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘└┘
┌┐┌┐┌┐ ┌┐┌┐┌┐ ┌┐┌┐┌┐
────┘└┘└┘└────────┘└┘└┘└────────┘└┘└┘└───
┌────┐ ┌────┐ ┌────┐
────┘ └────────┘ └────────┘ └───
(This picture comes out perfect in Notepad)
Did not look good in notepad
Did not look good in notepad for me, but looks pretty good in my browser. The nature of the timer system in the U6 microcontroller is such that the same clock feeds all PWM, so it can't do different frequencies at the same time. Perhaps you could use the Freqout mode to create the top waveform, and PWM to create the botton waveform, and then the bottom waveform is controlling a gate that is gating the top waveform to get you the middle waveform.
Thank you for your speedy
Thank you for your speedy response. This was our original reason to purchase a U6 and we are still working on it. The problem is we were hoping to get enough precision and flexibility (changing the base frequency and the number of pulses in the envelop) which could be easily done with the proposed PWM mode suggested in our comment. The problem is probably that we had been spoiled by our U12 and hardware solution that is precise within ±1 µsec (although ±1 msec would be enough) but we were hoping to simplify it to reproduce it in multiple units. Thanks again.
It seems like you can do it
It seems like you can do it with my idea of having the U6 produce the 1st and 3rd waveforms, then using the 3rd waveform to gate the 1st waveform thus creating the 2nd waveform.
Looking back at your function suggestion of "base frequency count for on time and base frequency count for off time", how does this relate to the 3 waveforms? I gather the 1st waveform is the base frequency, then your new mode idea makes one of the other 2 waveforms, and some other mode makes the last?
Basically what we need are
Basically what we need are waveforms #2 and #3.
Using a very simple hardware latch we can produce #3 from #1 and #2
#1 can be reproduced using Frequency out (mode 7) and #2 using stop on count (mode 9)
The problem is #1 and #2 would need to be in synch in order for the latch to work, but they wobble around. Is there a way to keep them in synch?
Unfortunately, the same problem would probably exist using the suggested PWM feature.
Two simple subs we use in VB.NET can be found at:
https://www.unc.edu/~ogmonbur/es/LJ_U6_Timer.txt
Thanks again for your help.
We know that you can make #3
We know that you can make #3 using a timer in PWM Output mode and #1 using a timer in Frequency Output mode. Since all the timers are based on the same clock, I would say they will be in sync most interpretations of in sync. The downside to the fact that they use the same clock, is you are limited in your frequency options for #1.
Once you have #1 and #3, you just add a gate of some sort where #1 is the input to the gate and #3 is connected to the enable for the gate. Probably also want a pull-down on the output of the gate to hold it low when disabled.
I keep suggesting that as there is not a good way for us to do this in firmware. The hardware just is not set up for it.
What I meant by being out of
What I meant by being out of phase is illustrated by the jpeg at:
https://www.unc.edu/~ogmonbur/es/LJ_U6_Timer.JPG
Using the program mentioned in the my previous comment with a "burst count" of 2.
The idea of using a DAQ unit for this application might have been a bad idea although we were close to a very elegant solution. We are now looking into using an embedded microprocessor such as the Parallax Basic Stamp.
Thanks again.
In your program I just see a
In your program I just see a single frequency output with a stop timer. That would just create 1 waveform, so what is the other waveform you show in the jpg?
Using my suggested technique the waveforms will be in sync.
The waveform with the 2
The waveform with the 2 pulses comes from Timer0 that is restarted with every "Go1" command.
The continuous waveform comes from Timer2 that is setup in the "ES_LJ_Configuration" procedure.
I tried many ways to stop and restart Timer2 at the same time as Timer0 but the results were always very similar.
I will try again the PWM as you suggested but, if I remember correctly, we could not get enough flexibility in the resulting time on and time off.
Using PWM To make a long
Using PWM
To make a long story short:
Ideally we would need to vary the pulse on and off times separately in a range of 1 to 500 milliseconds.
Using the base frequency of 48MHz we were able to operate in a range of 4 to 340 milliseconds. Which, for the time being we can accept.
The problem remaining was that 1 kHz could not be reached but this was solved to an acceptable level by using 32 kHz and dividing it in hardware using a 74LS393. The actual 32kHz varies from 29.4 to 35.3 depending on the values of the various divisors, resulting in the 1 kHz pulses to take values from 922 to 1100 Hz; which is not great bit acceptable.
Thank you for convincing me of pursuing the PWM solution.
Should you be interested, parts of the VB.NET listing and resulting waveforms can be found at:
https://www.unc.edu/~ogmonbur/es/LJ_U6_Timer_B.txt
and
https://www.unc.edu/~ogmonbur/es/LJ_U6_Timer_B.JPG
Hi! I have used the PWM
Hi!
I have used the PWM output mode to generate a rectangular wave. Right now I don't know how to generate a second wave that is a complement (the negation) to this wave . Could you suggest any functions that I can use?
Thank you!