Saturday 4 March 2017

Introducing the Digitool


One of the most useful tools for micro-controller design is the logic analyzer. You can find one for every budget or performance, but lately those based in USB connection to PC have gained popularity  (not not mention the chinese copies). The main drawback of USB based logic analyzer is the need of using a computer, which uses to be a bit difficult when doing field testing.

Digitool isn't intended to replace a logic analyzer; it's main purpose is being a quick test tool for microcontroller based development.

Digitool prototype looks like this:



Characteristics

Main characteristics are:

  • Frequency measurement up to 10Mhz, with 2 gate times (1 sec and 0.1 seconds), TTL input.
  • Square wave injector, 10 frequency steps, up to 1Mhz. The injector is based in microcontroller's PWM module, so it can be working no matter of which  function is being used in the Digitool.
  • Logic probe with 4 channels, 1024 samples buffer depth and 500 ksps rate. Acquisition can be triggered either by pushing a button or by edge change in any input.  Sample rate will be improved in next firmware releases.
  • User interface with 4 buttons and option menu shown  in screen's bottom line.


Project details

  • Language used: Jalv2 + Jallib libraries.
  • EDA software. Kicad v 4.0.5.
  • Development done under Mac Os Sierra for EDA and programming. PIC programming done under Windows using Pickit2.
  • Microntroller: PIC18F2525 @ 32 Mhz (cristal de 8 Mhz crystal and inner PLL), powered at 5 Volts.
  • 84x48 pixels graphical lcd (nokia 3310), powered at 3 volts
  • RAM data access in logic analyzer mode is done using PIC's POSTINC registers, which increase writing speed. 
  • First digital input is connected to two pins: digital input and timer input. This approach has ben taken to simplify software design; the Timer 1 is used in 16 bits mode to implement the frequency meter mode
  • Gate time for frequency meter is done using timer 2 as a source to trigger the interrupt routine.

Remarks

  • Microcontroller's PLL module allows clock frequency up to 40 Mhz; unfortunately, library used for LCD management is incompatible with this speed. Right now, the prototype works at 32 Mhz, but following step is trying to increase speed
  • LCD is powered at 3.3 V, whereas the microcontroller is powered at 5 V. This design was chose n to speed up microcontroller; powering microcontroller at 3.3V means using a low power version (18LF2525) which is slower

Downloads

       A zip file containing all source code, schematics and board design is available for download here.



Licences and disclaimers

Source code will be available (in following posts) for downloading for eveybody. Any derivative based on Digitool is requested to  mention original design.

Digitool has been designed for author's use and hoping that it can be useful for any DIYer. The tool is not intended for professional or continuous use. The author declines any liability for damages (either personal or material) or injuries due to the use of this tool; use it under your own responsibility.

4 comments:

  1. Replies
    1. Proposals are always welcome.Feel free to send some positive proposals

      Delete
  2. Please upload your project to GitHub.

    ReplyDelete
  3. If you choose a PIC18F26k20 you have 3,3V and a maximum speed of 64 MHz.
    I like JAL.

    ReplyDelete