Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| waveforms_-_rom_logic [2016/11/28 12:39] – [6. Example: PWM modulator] Mircea Dabacan | waveforms_-_rom_logic [2022/10/04 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 49: | Line 49: | ||
| // | // | ||
| - | ===== 3. ROM logic User Interface in WaveForms | + | ===== 3. ROM logic User Interface in WaveForms ===== |
| In the Pattern Generator, click the green “plus” sign and select ROM logic, as shown below. | In the Pattern Generator, click the green “plus” sign and select ROM logic, as shown below. | ||
| Line 116: | Line 116: | ||
| ===== 5. Example: Binary counter with Count Enable input. ===== | ===== 5. Example: Binary counter with Count Enable input. ===== | ||
| - | In the figure below, DIO8 is renamed CE and is used as Count Enable. DIO7…DIO0 are renamed c7…c0 and are the state/ | + | In the figure below, DIO8 is renamed CE and is used as Count Enable. DIO7…DIO0 are renamed c7…c0 and are the state/ |
| Line 1 in the Truth Table (equivalent to 2< | Line 1 in the Truth Table (equivalent to 2< | ||
| Line 158: | Line 158: | ||
| // | // | ||
| - | A 5-bit counter is implemented in a ROM logic object, as below, on DIO9…DIO5, | + | A 5-bit counter is implemented in a ROM logic object, as below, on DIO9…DIO5, |
| {{: | {{: | ||
| Line 164: | Line 164: | ||
| // | // | ||
| - | A second ROM logic (sheet PWM in RomLogicTrouthTables.xls) compares DIO9…DIO5 = c4…c0 = “5BitCounter” with DIO4…DIO0 = s4…s0 = ”Sample”. DIO10 = CY = ”CarryOut” is High when “Sample” is higher. Notice again how higher order bits (later lines in the Truth Table) override the lower order bits (earlier lines in the Truth Table). | + | A second ROM logic (sheet PWM in {{: |
| {{: | {{: | ||
| Line 187: | Line 187: | ||
| // | // | ||
| - | Variable n-bit sample can be used as a modulator signal. For the second experiment, set a custom 5-bit Bus 1 in the Pattern Generator, to drive a sinus signal with 100 samples per period. Generate a .csv file, with 100 values of form (sheet SinusSamples in RomLogicTrouthTables.xls): | + | Variable n-bit sample can be used as a modulator signal. For the second experiment, set a custom 5-bit Bus 1 in the Pattern Generator, to drive a sinus signal with 100 samples per period. Generate a .csv file, with 100 values of form (sheet SinusSamples in {{: |
| $$sample_i=16+int(15*sin((2∙π∙i)/ | $$sample_i=16+int(15*sin((2∙π∙i)/ | ||
| Line 224: | Line 224: | ||
| // | // | ||
| - | A 5-bit PDM modulator is implemented in the PDM Accumulator ROM logic object, with DIO 9…DIO5 = a4…a0 as “Accumulator”, | + | A 5-bit PDM modulator is implemented in the PDM Accumulator ROM logic object, with DIO 9…DIO5 = a4…a0 as “Accumulator”, |
| {{: | {{: | ||

