Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: PIC logic analyzer - digital storage oscilloscope

  1. #1

    PIC logic analyzer - digital storage oscilloscope

    Being curious about logic analyzers and pc based oscilloscopes, I started researching a little bit. I had initially looked at the bitscope oscilloscope. The original bitscope based on 16F84 and then the BS300 which have their schematics published gave me some ideas. The solution is based on a hardware and pc based software combination. The hardware for a logic analyzer based on a buffer connected to a SRAM chip. The microcontroller controls the address when data is stored in the SRAM and then sends everything to a pc. There is a second non electronic and less DIY friendly which is the pc software. I have successfully obtained/built the following:-

    1) CD4050 buffer- max 15V input
    2) HM62256 32K x 8 bit RAM- Allows to create a 8 channel 32K buffer logic analyzer
    3) C#.NET based application using MSchartcontrol of type line with a max Y-Axis limit of 1 and low limit of zero that can read serial ports(I am using FTDI serial to USB conversion for the time being)

    I need to fit all the above together but the software with a simple serial dump from the microcontroller worked.

    Whats needed to turn the above into a pc based DSO is a TLC5540 75MHz bandwidth 8 bit ADC capable of 40MSps () in a combination with a vertical buffer connected to the CD4050 buffer, change the graph to match the vertical sensitivity.

    All this does not seem impossible but I will keep it as a logic analyzer first and then consider the DSO.

    The are simpler implementations like the DPscope which I consider to prototype and see what happends

    I'll keep posted

  2. #2

    Basic C# serial communication app

    I have successfully built a small C# application that receives the data being sent by the pic over a CP3102 serial to USB converter. Attached is a picture of the working app. There seems to be an issue with the disconnection which I need to fix otherwise it worked straight from start. C# serial app.JPG

  3. #3
    I have been able t successfully solved the issue with the disconnection it was due to the thread issue between the UI and the serial class in C#. I am now able to echo character sent from my C# app to the microcontroller back to my C# app. Next step is a protocol build up

  4. #4

    Working Logic analyzer

    Attached in a sample screen shot of the working logic analyzer software Working analyzer.jpg. For the time being the capture is done and sent to the pc @ 115200 Baud without any buffering. I am still working with the HM62256 RAM. I need to figure out why I am not getting the value I am writing to a location but that should be simple to solve either its the signals/timing or my breadboard connections. I will keep posted

  5. #5

    Schematic

    Attached is the real time analyzer schematic. I am going to build it on stripboard just to have something more stable to work with. I'll keep posted. It lacks input protection diodes which I will add later
    Attached Images Attached Images
    Last edited by zeus_threat; 01-07-2014 at 01:14 PM.

  6. #6

    Protoype logic analyzer

    After some issues with reading ports and some others in clearing the data on my charts, i finally got the logic analyser to a stand alone prototype. Its a slow device i am working with right now but i think things look promising. Currently the serial port is stable at 115200 Kbps and all it does is when it receives the character c the ports are sampled, time is incremented and the whole is sent in the format PORTData Time; continuosly until the stop character is sent. While data is being sent the C# software cumulates data in memory and when is sent, the data is transformed and displayed on a C# chart control. I am currently sampling >3000 port reads per seconds including time required to transform and send the data to the FTDI. Its very far off the 24 mega sample sent by some pc based logic analyzer but with some more hard work i should get there. The pic is currently clocked with a 20MHz crystal and working at 5MHz. Upgrading to an STM32F103RBT6 working at 72MHz should make a huge difference but its not for now. The next step is not use this prototype to help me debug the issues i am having with the HM62256 chip. The attached pic shows the prototpe its ugly and dirty but it works. At the top is the CD4050BE, mid is the 16F628A and bottom is a MAX232 and the serial port to which a serial to USB converter is connected. The side board is a 7805 regulator. Deriving power from the RS232 port did not prove successful but direct USB power should solve that since the circuit consumes only 3mA of current.
    Attached Images Attached Images

  7. #7

    HM62256 working

    I did some test with my prototype and the waveforms showed a lot of losses even for a 5KHz signal. But at leat that helped to stabilize the pc software and solve some instability issues i was getting on input. I managed to get the HM62256 to work. The issue was that i was using PORTB and the debugger was connected to it. I shifted to use 2 74HC595 shift registers for the address and it worked like a charm. I am thinking of reorganizing my Address and datalines around the pic and see if i can do without the 74HC595 for the time being since i want a stand alone analyzer and then i'll see for the scope. Am also wondering since i got 2X HM62256 whether to go for 16 channels and each channel is buffered to an HM62256 for 265K storage or parallel 2 HM62256 and stay with 8 channels but 512K storage. An idea also came to my mind to have both at the same time and have the software control it. I'll see how well it works with one HM62256 and decide afterwards.

  8. #8

    Improvement with the real time analyzer

    I gave the 16F628A version another try. I have stopped sampling time and aimed only for the data. There seems to be a compromise to be made between buffer size, signal frequency and compiler operation mode. I am currently using a 80 bytes array to capture PORTA and using only RA0-RA4 attached are the waveforms captured in lite mode (free mode) and pro mode (which can be activated for limited time) for a 100KHz signal. I am currently using the signal coming off a probe adjustment pin on a DSO nano. The HM62256 is still on but I am getting heavy interference on the data pins which I need to terminate most probably to solve the issue. I will keep posted100KHz Lite mode.JPG100KHz PRO mode.JPG

  9. #9
    Nice results
    www.diysmps.com & www.Micro-Audio.com

  10. #10

    16F628A schematics

    16F628A logic analyzer.JPG This is the unit I used to get the results I mentioned. In the meantime I will be trying the same approach with a STM32VL board and compare the results. Then i'll go back to solve my HM62256A stray noise issues.

Similar Threads

  1. Need help to buy an oscilloscope.
    By victorwang in forum diysmps
    Replies: 9
    Last Post: 05-30-2013, 02:32 PM
  2. Looking for good quality USB Oscilloscope
    By Rogelio in forum General Electronics
    Replies: 3
    Last Post: 08-29-2011, 04:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •