Jun 22 2012

Oscilloscope Test

Published by jfrank at 3:11 pm under open source

Recently I bought an oscilloscope to help diagnose some problems I’ve been having with a Newhaven Displays model NHD-3.12 blue OLED screen. It uses the SPI interface, I read the datasheet to say that it should respect MSB first and is a mode 3 spi device.

I am just going to share a bit of what I learned by turning it on and testing various output pins from my micro controller program that is running on my Teensy, sort of an Arduino. I’ll use Y and B for the upper yellow, and lower blue signals respectively. I’ve been working with the author of the u8glib, Oliver Kraus to add support for this display and this is a test of the initial version of that program. With every diagnostic that I can perform the C program he sent seems to be doing everything correctly but the display will not respond.

This is a high level view of the clock pin (Y) and the output pin (B). You can see that the clock doesn’t run continuously as I had assumed, but instead runs only when there is data to be sent. The whole hello world display program takes about 600ms in a loop and waits 500 ms at the end of each data load. The low activity area you see around the center is the pause.

Y is the clock pin, showing device init the pin goes high just once as an artifact of power up . B is the reset pin, showing pulling reset low and then high again which should start the display.

Y is again clock during init, and B is the chip select pin. Chip select for this device should be low as active, and it exhibited that behavior. It was only high while data/commands were not being sent, and this brief period during the reset signal from the last image.

The next four sets of two images will show three pins during the initial byte phrases of the Hello World paging loop. Challenge, can you can calculate the MSB first hex hex values for the output pin? First picture per set, Y is clock, B is the output pin. Second picture, Y is mode and B is again output. Mode is irrelevant for the challenge, but for the device the mode tells whether to count the byte as an instruction/command (Y low) or as an argument/data (Y high).

Byte 1

Byte 2

Byte 3

Byte 4

One response so far

One Response to “Oscilloscope Test”

  1. Oliveron 22 Jun 2012 at 11:55 pm

    good documentation.

    This is what i would do next:
    - ensure that the power to the display is valid
    - ensure that the prototyping board has no issues (check signals and power directly at the PCB)
    - put a “all pixel on – delay – all pixel off – delay – all pixel normal” sequence into the code. It could be also executed as part of the page preparation sequence (maybe before the column / row setup)

    Oliver

Trackback URI | Comments RSS

Leave a Reply