mwwhited / DeviceBridge

The original intention of this device is to bridge the old world line printer port world of the Tektronics TDS2024 with the more modern world of USB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Device Bridge

Summary

The original intention of this device is to bridge the old world line printer port world of the Tektronics TDS2024 with the more modern world of USB. This project is loosly based on the work from Boriz but is a total rewrite of my own design.

Table of Contents

Design Goals

  • When the print button on the TDS2024 the screen capture/print out should be stored on the bridge
  • Captures should stored locally on the bridge device
  • Capture to SD card or local EEPROM
  • Allow user to select between SD, EEPROM, and direct transfer
  • If SD is not found then only record to EEPROM
  • When not printer or after a configured time period show the current time/date on the LCD display
  • Reading file transfer header try to detect type and make best guess on proper extensio
  • Allow user to over write the file type
  • Allow user to select from name formats from LCD module or Serial over USB
  • Allow computer user to list files over serial connection
    • should should list SD (if provided) and EEPROM
    • allow transfer of selected files
    • update configuration options
  • SD card should support FAT, FAT32 and ExFat.
    • if programming memory allows enable FAT12 as well
  • use RTC to maintain current date/time.
    • configurable over serial
    • condsider the ablity to set from the UI
  • consider using one of the secondary serial lines as an RS-232 bridge for SCPI commands

Suggsted Improvements

Technical Notes

  • Shields
    • LCD and Keypad
    • Deek Robot Data Logger
      • Parital clone of the Adafruit Data Logger v1 no support for design information from Deek-Robot avalible.
      • Required extensive rerouting to cleanly support the Arduino Mega 2560
        • Cut traces for shield pins 11/12/13 and reroute SPI lines (MOSI, MISO, SCLK) from ICSP header to 11/12/13 taps respectivly
        • Cut traces for pins 4,5 reouted I2C SCL/SDA to 5/4 respectively (RTC DS1307 support)
      • Added Windbond W25Q128 16MB SPI EEPROM for local storage
        • Cut static traces for pins 12/13 on the quad buffer (74HC123) from VCC power (pin 14).
        • bodge pin 13 to ground to enable 4th buffer.
        • bodge pin 12 to arduino pin 3 for chip select
        • bodge pin 11 to SPI EEPROM Chip Select
        • bodge MOSI and SCLK from the SD card to SPI EEPROM
    • Custom IO for LPT Port
      • Used 2x13 2.54mm header for 2x13 IDC to DB-25
      • header pins should be mapped as shown in the pinout table
      • note the Strobe line should be mapped to a hardware interrupt pin
      • Line Printer Terminal

Action Sequence Diagrams

Initialize

-> printer: activate
activate printer
printer -> printer: +Error,+Select,-PaperOut,-Busy,+Ack
printer -> terminal: ^Strobe,^Data
note right: Add ^AutoFeed,^Init,^SelectIn
deactivate printer

On Print

loop while data

-> terminal: print
activate terminal
terminal -> terminal: Set Data
terminal -\ printer : -Strobe
terminal -\ printer : +Strobe
activate printer
printer -\ terminal : +Busy
alt if new
  note right: What signals a new job?
  printer -\ buffer : new
  activate buffer
end
printer -> terminal : Get Data
terminal --> printer : <Data>
printer -\ buffer   : Set Value
buffer -\ buffer    : Input Index++
printer -\ terminal : -Ack
printer -\ terminal : -Busy
printer -\ terminal : +Ack
alt if complete
note right: What signals job complete?
  printer -\ buffer : complete
end

end
deactivate terminal
deactivate printer

On New File

--> disk
activate disk
disk -> file: check exists
  loop do while exists
    activate file
    file -> file: increment name
  end
  file --> disk: <new name>
  disk -> file: create <new name>
  deactivate file
  alt success 
    disk --> : <file handle>
  else fail
    disk --> : <error>
  end

Buffer to File

--> buffer : full
activate buffer
alt if new
  disk -\ file : new file
  activate file
end
activate disk
buffer -> file 
loop while full
  file -> file: write bytes
  file -> buffer: Output Index++
end

alt if complete
  note right: What signals a new job?
  disk -> file: close
  deactivate file
end 
deactivate buffer

Notes

About

The original intention of this device is to bridge the old world line printer port world of the Tektronics TDS2024 with the more modern world of USB

License:MIT License


Languages

Language:C 92.2%Language:C++ 7.8%