Professional Documents
Culture Documents
Abstract
This Application Note describes how to realize a “just for fun” oscilloscope with a PSoC™ and some
additional components. The project has two parts: the PSoC hardware and firmware and a Microsoft.Net
front-end application. The oscilloscope hardware is connected to the host PC through an RS232 interface to
exchange data and commands. The RS232 communication protocol is specified in a separate document to
let readers who want to design their own hardware/firmware or their own front-end application to do so.
differential
output
Divide 12 bit
0
by 10 0 0 Amplifier incremental
Differential ADC
input 0 0
Instrumental
Amplifier
Oscilloscope RS-232 to
FW UART driver Host
Offset [PSOC CPU] PC
Offset Generator
Adjust
0 0
signals
0 0
0
PSOC
A B
Figure 3. Pin Names and Sources (A) and Types (B)
Figure 4. Breadboard
ScopeEngine
-serial : Rs232
-reader : Thread
-plotter : IScopePlot
Scope
-bReaderRun : bool
-samples : int[] +scanModeAddPoint(in newVal : int)
-samplesPointer : int +replaceModeSetPoints(in newValues : int[])
-bTriggerEdgeRising : bool +setLinkStatus(in status : int)
-bTriggerSingleAuto : bool +Scope()
-bContinuousScan : bool -redraw(in sender : object, in e : PaintEventArgs)
-READ_TIMEOUT_MS : int #Dispose(in disposing : bool)
-SAMPLE_BURST_SIZE : int -InitializeComponent()
-Main()
+setTimeBase()
-Scope_Load(in sender : object, in e : EventArgs)
+setVoltageGain()
-timeBaseTB_Scroll(in sender : object, in e : EventArgs)
+setScanOrBurstMode()
-voltageGainCH1_Scroll(in sender : object, in e : EventArgs)
+setVoltageOffset()
-holtRunBt_Click(in sender : object, in e : EventArgs)
+shutdown()
-scanTriggerMode_CheckedChanged(in sender : object, in e : EventArgs)
+ScopeEngine()
-voltageOffsetCH1_Scroll(in sender : object, in e : EventArgs)
-makeTriggerModeOptions()
-ch1OffsetIncr_Click(in sender : object, in e : EventArgs)
-OnDataReceived()
Figure 6. 6V-Powered Example Board -dataReaderLoop()
-ch1OffsetDecr_Click(in sender : object, in e : EventArgs)
-sendCmd()
Appendix
VCC
VCC
20 28 1 16
P2[0] VCC C1+ VCC
8 C5 3
P2[1] 1u
C1-
21 27 4
CH1+ P2[2] P0[6] C2+ C2
7 5 2 1u
P2[3] C2- V+
R2 22 15 6
CH1- P2[4] P1[7] C4 V-
9M 1u
6 13
P2[5] P1[6]
23 16 11 14
P2[6] P1[5] T1IN T1OUT C3 C1
5 12 10 7 1u 1u
P2[7] P1[4] T2IN T2OUT
R1 R3 17 12 13
9M 1M
P1[3] R1OUT R1IN Tx
24 11 9 8
P0[0] P1[2] R2OUT R1IN Rx
4 18
P0[1] P1[1] GND
2 10 VCC 15
P0[5] P1[0] GND
R4 3
1M
P0[3]
25 19 R5 MAX232
P0[2] XRES
26 1k
P0[4]
19
XRES
9
SMP
R6
14 1k
VSS
CY8C27443