ComputerVoltageSources group photo

Yahoo Groups archive

ComputerVoltageSources

Index last updated: 2026-04-28 22:42 UTC

Message

Re: Hardware thoughts

2006-03-08 by djbrow54

What do you mean by retask serial I/O?  You just use it for MIDI.
Why a front panel switch to select MIDI mode?  What mode?  Just use 
the other controls.

For a display, I used a 2x20 and a 2x8.  While the 2x20 is great, it 
is impractical in a modular due to the width.  I made mine in a small 
external package.  It is great for streaming data as in monitoring 
MIDI data streams but I find it a bit impractical for PSIM output.  
The 2x8 is much nicer as I can fit it into a 1U module and it has 
sufficient characters to display the name of the program and various 
user prompts.  The backlight is a concern as these can draw a lot of 
power. The smaller displays have lower backlight power requirements.

I chose to use a microcontroller for the display because the display 
controllers are a real pain.  Scrolling & line wrap require lots of 
manipulation by the processor.  Clearing the display takes a lot of 
time.  And, in the smaller displays with serial interfaces, there is 
no status feedback so you have to time all communications.  I decided 
to offload the PSIM from this burden and use a microcontroller in more 
of a TTY character-oriented interface.  That also allows me a power-up 
default message.

Since I used a microcontroller, I was trying to determine the most 
appropriate interface.  I came up with lots of schemes such as SPI, 
multiplexing other lines, and serial.  The AtomPro programming port 
can be used as a general purpose input or output.  I even had a 
version that used this interface.  It has a screwy pseudo-RS232 
circuit so the levels are odd and change whether a RS232 cable is 
attached or not.  I came up with two schemes that could use this I/O, 
one as simple as a pulldown resistor.  I didn't want to dedicate 
multiple pins to a display interface.  In future designs, an SPI 
interface could be shared with DACs and other perphiperals however the 
timing is slow (described later).

The larger issue was how to communicate with the display that would 
not interfer with MIDI or timers.  Using the serial command for a 
general I/O line requires interrupts to be off. I wrote some code but 
it was so convoluted with enable and disable statements that I 
abandoned this approach.  Instead, I decided to use the MIDI 
subsystem.  The hserout command is fully interrupt driven with a 128 
byte circular buffer.  I ended up encoding my display commands as an 
educational sysex command.  This requires wrapping the display 
messages with 2 bytes at the beginning and one byte at the end.  
However, the command executes lightning fast and the communications 
all happen in the background via interrupts.  Sending a 21 byte 
message to the display (3 wrapper, 16 characters, 2 display control 
commands) takes only 250 uS.  Sending a 4 byte message to the display 
(3 wrapper and 1 character) takes only 100 uS.  Thus it has little 
impact on processing performance.  The SPI commands take much more 
time to execute. For comparison, sending four 16 bit words to the DAC 
with some manipulation requires 750 uS.

Now the actual transmission time will be slower so subsequent MIDI 
data output will be delayed by the display transmission time but I 
find that I don't send MIDI data in large batches or necessarily 
interleaved with display messages.  It hasn't been an issue so far.

I'd appreciate comments about this scheme.  Seemed simple, high 
performance, and easily retrofittable.  Since I had extra outputs on 
the microcontroller, I added 4 digital outputs.  I was always lacking 
enough outputs for trigger and gate and hated to dedicate a full DAC 
channel for each of these.  These I/Os can be set, reset, and toggled.

One future feature ... a mode to capture triggers.  You can't scan for 
them because of timing.  I'd either use an edge capture or edge 
interrupt mode.  Unfortunately on the PSIM the I/Os capable of edge 
interrupts are not easily accessible.

This weekend I did design a PCB that combines MIDI and display.  If 
there is enough interest I could use some help to make this available.

Dave

--- In ComputerVoltageSources@yahoogroups.com, Eric Brombaugh 
<ebrombaugh@...> wrote:
>
> What's the hardware architecture going to be? I
> * BasicATOM Pro 28-M
>
> * Serial I/O
>   - BasicATOM Pro uses built-in UART on H8/3664
>     processor for firmware loads.
>   - Need to re-task serial I/O for MIDI interfaces
>   - Front panel switch to select MIDI mode?
>
> * LCD
>   - 2x16 char LCD w/ backlight seems a fairly useful
>     & common mod. Use Serial I/O with
>     external processor, or hook up parallel via SPI
>     port extender (see above).

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.