Lao Liu used STC8A8K64S4A12, but this model was discontinued and the price soared. The replacement model is the new STC8A8K64D4, which has the same performance and is packaged in QFP48. However, the IO port configuration is different. I modified the program and it is perfectly compatible. See the attachment for the gerber file and the modified project file.
B station video link: https://www.bilibili.com/video/BV1ao4y1m7ec/
Operation instructions: Main interface - Option setting mode: Single click encoder: Switch to start/pause sampling Double click encoder: Switch waveform horizontal scroll mode/option setting mode Long press encoder: Enter the setting interface Rotate encoder: Modify the current parameter Press and rotate encoder at the same time: Switch between parameters Main interface - Waveform horizontal scroll mode: Single click encoder: Switch to start/pause sampling Double click encoder: Switch waveform horizontal scroll mode/option setting mode Long press encoder: Enter the setting interface Rotate encoder: Scroll waveform horizontally (valid in pause sampling state) Press and rotate encoder at the same time: Scroll waveform vertically (valid only in pause sampling state) Setting interface: Single click encoder: Invalid Double click encoder: Invalid Long press encoder: Return to the main interface Rotate encoder: Modify the current option Press and rotate encoder at the same time: Switch option
Main interface parameters: Horizontal axis time interval: "500ms", "200ms", "100ms", "50ms", "20ms", "10ms","5ms", "2ms", "1ms", "500us", "200us", "100us" (100us is only available in automatic trigger mode) Vertical axis voltage range: Set the upper limit of the voltage range, the maximum is 30V, rotate the encoder clockwise to set the voltage upper limit to 0 to enter the automatic range, and rotate counterclockwise to enter the manual range Trigger value: Set the trigger voltage value, and the trigger position is placed in the center of the screen Trigger direction: The up and down arrows represent the rising edge trigger and the falling edge trigger respectively Trigger mode: Auto (automatic trigger): Continuous sampling, the indicator light is always on, and the start and stop are controlled by clicking the encoder; when the trigger is successful, the trigger point is located in the center of the screen, if the trigger fails, the waveform scrolls irregularly, and the Fail sign is displayed on the left side of the screen Normal (normal trigger): Wait for pre-sampling, and wait for the indicator light to light up to indicate that the pre-sampling is over. At this time, you can input the signal; After the trigger is successful, the waveform is displayed and continue to wait for the next trigger; If there is a new trigger success, the new waveform will be automatically displayed. If there is no new trigger success, the screen waveform will remain and wait for the next trigger; It is necessary to pay attention to setting the correct trigger value, otherwise it will always be in the waiting trigger state and the screen will not display the waveform Single (single trigger): Wait for pre-sampling. When the indicator light turns on, it means the pre-sampling is over. Then you can input the signal. After the trigger is successful, the waveform is displayed and the sampling stops. The user needs to click the encoder to start the next sampling. Please pay attention to setting the correct trigger value, otherwise it will be in the waiting trigger state and the screen will not display the waveform. The main interface status display: Run: Sampling Stop: Stop sampling Fail: In automatic mode, the trigger value exceeds the waveform range, causing the trigger to fail. Auto: Automatic range Setting interface options: PMode (drawing mode): Vector: The waveform is displayed as a vector Dots: The waveform is displayed as a dot matrix LSB (sampling factor): 100 times the voltage division factor. For example, if a 10k+2k resistor is used for voltage division, the voltage division factor is (10+2/2)=6. The theoretical value of LSB is 6x100=600. Fine-tune according to the actual resistance accuracy. BRT: OLED brightness
save settings: When you press and hold the encoder to exit the setting interface, all parameters of the setting interface and the main interface are saved to EEPROM.
2020-04-30 Update 1. Added single trigger and normal trigger functions, and customized trigger points to capture waveform changes 2. Set the ADC sampling port to high-impedance input according to the specification 2020-5-3 Update 1. Added waveform frequency display 2. Use encoder to scroll waveform horizontally/vertically 3. Use encoder to scale waveform vertically 4. Users can set trigger level