library/hd44780/hd44780ioClass/hd44780_NTCU165ECPB.h
int ioinit()
{
int status = 0;

	// setup SPI signals
	digitalWrite(_cs, HIGH);
	pinMode(_cs, OUTPUT);

	pinMode(_clk, OUTPUT);
	digitalWrite(_clk, LOW);
	pinMode(_data, OUTPUT);

// check to see if SPI has beginTransaction() and endTransaction()
// this was added in IDE 1.06 and so if using an IDE older than that,
// H/W spi will not be used
// This requires that <SPI.h> be included prior to this header 
#if defined(SPI_HAS_TRANSACTION)
	// check to see if h/w spi can be used
	if((_data == MOSI) && (_clk == SCK))
		SPI.begin();
#endif

	// maybe look at cols to see how many should be turned on?
	devicewrite(CMD_SETDISPLAYLEN|0x7);	// show all 16 characters

	devicewrite(CMD_SETDIGSCAN320);		// set digit scan time to 320us
	devicewrite(CMD_AUTOINCREMENT);	// set auto advance to next column on writes

// for now turn on display and "backlight"
// clear and set to "home" address position
	devicewrite(CMD_DISPLAYON);
	devicewrite(CMD_SETBRIGHTNESS | 0x7); // max brightness
	device_clear();

	return ( status );
}
// ioinit() - Returns non zero if initialization failed.
Returns non zero if initialization failed.
Returns non zero if initialization failed .
int ioinit()
{
int status = 0;
	digitalWrite(_cs, HIGH);
	pinMode(_cs, OUTPUT);
	pinMode(_clk, OUTPUT);
	digitalWrite(_clk, LOW);
	pinMode(_data, OUTPUT);
#if defined(SPI_HAS_TRANSACTION)
	if((_data == MOSI) && (_clk == SCK))
		SPI.begin();
#endif
	devicewrite(CMD_SETDISPLAYLEN|0x7);	
	devicewrite(CMD_SETDIGSCAN320);		
	devicewrite(CMD_AUTOINCREMENT);	
	devicewrite(CMD_DISPLAYON);
	devicewrite(CMD_SETBRIGHTNESS | 0x7); 
	device_clear();
	return ( status );
}
int ioinit ( ) { int status = 0 ; digitalWrite ( _cs , HIGH ) ; pinMode ( _cs , OUTPUT ) ; pinMode ( _clk , OUTPUT ) ; digitalWrite ( _clk , LOW ) ; pinMode ( _data , OUTPUT ) ; #if defined ( SPI_HAS_TRANSACTION ) if ( ( _data == MOSI ) && ( _clk == SCK ) ) SPI . begin ( ) ; #endif devicewrite ( CMD_SETDISPLAYLEN | 0x7 ) ; devicewrite ( CMD_SETDIGSCAN320 ) ; devicewrite ( CMD_AUTOINCREMENT ) ; devicewrite ( CMD_DISPLAYON ) ; devicewrite ( CMD_SETBRIGHTNESS | 0x7 ) ; device_clear ( ) ; return ( status ) ; }
ioinit() - Returns non zero if initialization failed.
ioinit () - Returns non zero if initialization failed .
// setup SPI signals // check to see if SPI has beginTransaction() and endTransaction() // this was added in IDE 1.06 and so if using an IDE older than that, // H/W spi will not be used // This requires that <SPI.h> be included prior to this header  // check to see if h/w spi can be used // maybe look at cols to see how many should be turned on? // show all 16 characters // set digit scan time to 320us // set auto advance to next column on writes // for now turn on display and "backlight" // clear and set to "home" address position // max brightness