MB90580C | SPI | CS/SS pin?

Hi All!

I'm attempting to interface with a MB90580C chip through SPI. After much testing and tinkering I do need help.

The MB90580C is connected to a VFD. The program below nearly mimics the output of MB90580C with the exception of the delay between Command and Data Bytes: the delay is off by about 0 to 0.04ms. Which leads me to my first question: is that acceptable? Does this delay matter that much; couldn't the delay be any amount of time as the VFD controller would just be looking for the clock pulses as to when to start reading data?

When testing the code on the circuit the lights on the VFD are all flickering "randomly". I attribute this to the fact that I don't have the chip select/slave select enabled/disabled when transferring data, meaning the MB90580C clock and the arduino clock are fighting and enabling/disabling bits that shouldn't be. My problem is that I can't tell from the datasheet where the CS/SS is - So this leads me to my major question: Where is the chip/slave select on the MB90580C?

I am not an engineer and my background with this stuff is that of a hobbyist (first time with clocks/data pulses, etc.) so I appreciate the guidance and learning experience.

Here is the datasheet:
MB90580C Datasheet

And here is the code:

#include <SPI.h>

//CS/SS???
const int csPin = 10;

  //MB90580C gnd to gnd | GND   Does it need to be connected???
  //MB90580C input to digital pin 11 | MOSI
  //MB90580C output to digial pin 12 | MISO
  //MB90580C clock to digial pin 13 | SCK

void setup() {
  SPI.begin();
  SPI.setBitOrder(MSBFIRST); //MSBFIRST or LSBFIRST 
  SPI.setDataMode(SPI_MODE3); //CPOL = 1, CPHA = 1
  //40-bit data Transfer
}

//Command Byte: 0b  1000  0000  0001  0010  1000  0000  0000  0000  1000  0000
//Data Byte: 0b  0101  1011  0111  1111  1111  1101  0001  0011  0001  0010

void loop() {

  //Command Byte
  //digitalWrite(csPin, LOW); //select slave
  SPI.transfer(0x80); //first 8 outputs
  SPI.transfer(0x12); //second 8 outputs
  SPI.transfer(0x80); //third 8 outputs
  SPI.transfer(0x00); //fourth 8 outputs
  SPI.transfer(0x80); //fifth 8 outputs
  //digitalWrite(csPin, HIGH); //de-select slave
  delayMicroseconds(475);

  //Data Byte
  //digitalWrite(csPin, LOW); //select slave
  SPI.transfer(0x5B); //first 8 outputs
  SPI.transfer(0x7F); //second 8 outputs
  SPI.transfer(0xFF); //third 8 outputs    FD | Using FF for testing
  SPI.transfer(0x13); //fourth 8 outputs
  SPI.transfer(0x12); //fifth 8 outputs
  //digitalWrite(csPin, HIGH); //de-select slave
  delayMicroseconds(475);
  
}

So this leads me to my major question: Where is the chip/slave select on the MB90580C?

This chip doesn't have hardware support for SPI.

Which leads me to my first question: is that acceptable?

For an SPI device it's completely irrelevant. As the MCU in question doesn't support SPI in hardware it's probably kind of a software emulation and that one may react in any way, it doesn't have to be standard conforming.

The MB90580C is connected to a VFD.

What's a VFD in this context?
As you're writing about SPI: Do you think the MCU is an SPI master or slave? Do you try to replace the MB905508C by the Arduino or do you try to replace the VFD (whatever that may be)?

Thank you for your response.

The VFD in question is a Vacuum Fluorescent Display (newbie, didn't realize how many acronyms there are). The MB90580C microcontroller communicates with a 40-bit latch which controls the digits on the display.

Seeing that the MB90580C has UART my first attempt was to try read asynchronous serial data on SOT0. I was not able to frame the data. Eventually I tried reading the clock (SCK0: UART0 Serial clock I/O pin) as well using SPI. When I tried this, I was finally able to frame the data in 40-bit chunks with about 475 microseconds delay between "chunks" so I assumed it was SPI. Next I tried to emulate the data with the arduino with the exception of one byte to see if there was a change in the display.

I connected the arduino SCK to SCK0 (UART0 Clock), and MOSI to SIN0 (UART0 Input) but did so without the Chip/Slave Select as I couldn't find that. This test lead to the results stated - the display lights up segments of the digits "randomly"


You're right though, I should try to replace the MB90580C with the arduino at least to test things out.

Looking at the 40-bit latch it has a LS Latch strobe input pin which I'm guessing operates similarly code wise as a a CS/SS pin:
Set LOW to hold the shift register
Shift data in
Set HIGH the data of the shift register is read out

I would eventually like to learn how to use the UART0 pin to pass the data from the arduino to the MB90580C to the 40-bit register


Still not enough context for us. Keep in mind we know only the information in your posts about your project. So start from the beginning. Tell us what project you have why you are trying this, how you made the hardware decisions, etc. etc.

For example it's important for us to know if you have complete control over the software running on the MB90580C (but don't forget to tell us all the rest I listed above).