-- Lark9513.txt -- L. Stewart 4-Dec-81 21:57:11 Command port: C1 Data port: C0 - Commands to set up channels 1 through 4 OC1,FF,5F,01,E0,17 OC0,C0,05 OC1,E1,E2,E3,E4,E5 OC1,01 OC0,62,1B,B8,00,08,00 OC0,A1,FB,B6,00,00,00 OC0,22,11,A0,00,00,00 OC0,22,1B,28,00,00,00 OC1,4F,2F -- Tail of commands for all channels OC0,A2,D5,00,80,00,00 OC1,5F,3F -- Turn off all 5 sections OC1,DF -- Initialization OC1,FF,5F,01,E0,17 FF Master reset 5F Load all counters from Load registers (Cookbook) 01 Set data pointer (cookbook) E0 Enable data pointer sequencing 17 Set data pointer to Master mode register -- Master mode register OC0,C0,05 FOUT source F2 (1.536 MHz / 16, for 300 baud) Disable comparators and time of day FOUT divide by 5 (output 19.2 KHz, for 300 baud) FOUT ON, 8-bit bus, enable pointer, binary counting -- Set all outputs to LOW OC1,E1,E2,E3,E4,E5 -- Set data pointer to counter 1 OC1,01 -- Section 1, TSN OC0,62,1B,B8,00,08,00 Mode J, toggle output, binary count-down Source F1, falling edge, no gating Load = 184 Hold = 8 Since the output started LOW, the cycle will be LOW for 184 and HIGH for 8 -- Section 2, FrameSync OC0,A1,FB,B6,00,00,00 Mode R, Active HIGH output, binary count-down Source F1 (T1Clk), falling edge, Trigger falling edge Gate N (TSN) Load = 182 Hold = 0 It looks like the value for time slot N is 190-(8*N). For Time slot 24, trigger on the rising edge of Gate N and use Load = 6. e.g. for TS 24 use: OC1,C2,02 OC0,A1,DB,06,00,00,00 OC1,42,22 -- Section 3, Audio interrupt OC0,22,11,A0,00,00,00 Mode D, toggle output, binary count-down Source C1 (TSN), falling edge, no gating Load = 160 Hold = 0 The idea is that the audio DMAs are started at the same time as this timer, since the output starts LOW, it will go high, triggering an interrupt, after 160 sample times. The interrupt service routine will use command E3 to set the output back low, then it will toggle high again after the 320th sample. -- Section 4, Baud rate for Lark display OC0,22,1B,28,00,00,00 Mode D, toggle output, binary count-down Source F1 (T1Clk), falling edge, no gating Load = 40 Hold = 0 1.536 MHz / 80 (40 low and 40 high) = 19.2 KHz suitable for 300 baud. --Load and start first 4 sections OC1,4F,2F -- Section 5, Programmable interrupt (or possibly refresh control) -- CHECK OUT CHANNEL 5 OC1,D0,05 OC0,A2,D1,00,80,00,00 OC1,50,30 --Turn off channel 5 and set data pointer to channel 5 OC1,D0,05 -- Section 5 OC0,A2,D1,00,80,00,00 Mode R, toggle output, binary count-down Source C1 (TSN), falling edge, rising edge of PTimerStart trigger Load = 32768 Hold = 0 (Toggles output ~4 seconds after PTimerStart rises) -- Load and start section 5 OC1,50,30