Panteltje's scope_pic page

Panteltje's scope_pic page


This code is released under the GPL license, violaters will be procecuted


Single chip RS232 remote controlled storage oscilloscope implemented in a PIC 18F14K22

drives a 128 x 64 LCD-19-HG1286418C-VA, S6B0108-KS0108 based, graphics display


Features:

Fastest speed about 3.9 us per sample, 256 kHz sample frequency.
2 input channels and external trigger input.
internal or external trigger.
positive or negative trigger.
x y mode.
x y storage mode.
FFT mode.
graphics display driver.
11 time base ranges, 500 us to 1000 ms.
movable cursor with on screen display of time and voltage.
Power fail safe, comes back on with the last settings.
100 % RS232 controlled.
selectable baudrates.
input voltage range 0-4 V.
uses PIC internal voltage reference.
screen dump to text.
Can be used as a RS232 connected remote graphics display.

Default RS232 setting: 115200 Bd, 8 databits, 1 stop bit.


The diagram,
Notes: use a 7805 and not a 78L05 if you want to power the LCD backlight directly from the +5 V, else run it via a series resistor from the input DC.
The LCD reset is not used and directly connected to +5.
scope_pic-0.1-diagram-img_1938.jpg


The source code in asm, conditions of use, some documentation, use tar -zxvf scope_pic-0.3.tgz to unpack the archive:
scope_pic-0.3.tgz


RS232 commands:

commandfunction
ctrl L clear screen.
anENTER print analog channel n ADC steps, valid n is 2 (y) and 3(x).
BnENTER select baudrate 1=115200, 2=19200, 3=9600, default 115200, saved in EEPROM
bplot a black dot at the position set by command x and y.
Ddump screen to RS232.
FFFT on.
fFFT of.
G set timer1 reload saved in EEPROM default 175.
gprint timer 1 reload.
hhelp, this help.
jcursor left.
icursor up.
kcursor right.
mcursor down.
Odisplay on.
odisplay off.
pplot test, plots triangle.
rprint LCD data at x, y, test purposes only.
Sscope auto trigger.
sscope one shot trigger.
Tcprint character c at postion set by command x and command y, auto increment.
uLCD xy plot command, test purposes only.
wplot a white dot at the position set by command x and y.
WLCD print character test, test purposes only.
Qx y storage on.
qx y storage off.
xnnENTER move x plot position to nn (0-127), 0 is left.
ynnENTER move y plot position to nn (0-63), 0 is bottom.
Zx y mode on.
zx y mode off.
*change scope input y channel, toggles between 1 and 2, default 1, saved in EEPROM.
)input sensitivity range up, ranges 1, 2, 4 V full scale, default 4 V, saved in EEPROM.
(input sensitivity range down, ranges 1, 2, 4 V full scale, default 4 V, saved in EEPROM.
'trigger level up.
/trigger level down.
[timebase range slower.
]timebase range faster.
.calibrate inner loop up, when calibration defined only.
,calibrate inner loop down, when calibration defined only.
,calibrate outer loop up, when calibration defined only.
;calibrate outer loop down, when calibration defined only.
Remote plot commands:
1xxxxxxx bit 7 indicates start plot sequence, lower 7 bits hold the x address, pixel value combined with y address follows.
0pyyyyyy pixel in bit 6 (1 = black, 0 = clear), y address in lower 5 bits.


wave form display
scope_pic-0.1-scope1_img_1941.jpg


fft display
scope_pic-0.1-fft_1_img_1942.jpg





Scope_pic can also be used as a remote RS232 graphics display, so if you want a graphics LCD a few meters away from the PC:



An ASCII screendump example, use a fixed spaced font to view this.

An ASCII screendump example of the FFT of a 1000 Hz sawtooth waveform with overshoot, with the cursor on the third harmonic.

Click here for some other Microchip PIC projects.
Click here for some Linux programs I make available under the GPL.

Click here to send mail