background image

chipKIT™ Basic I/O Shield™ Reference Manual 

 

 

Copyright Digilent, Inc. All rights reserved. 

Other product and company names mentioned may be trademarks of their respective owners.

 

Page 

11

 of 

13

 

 

 

*/ 

 

PORTClearBits(prtVddCtrl, bitVddCtrl); 

 

DelayMs(1); 

 
 

/* Display off command 

 

*/ 

 

Spi2PutByte(0xAE); 

 
 

/* Bring Reset low and then high 

 

*/ 

 

PORTClearBits(prtReset, bitReset); 

 

DelayMs(1); 

 

PORTSetBits(prtReset, bitReset); 

 
 

/* Send the Set Charge Pump and Set Pre-Charge Period commands 

 

*/ 

 

Spi2PutByte(0x8D); 

 

Spi2PutByte(0x14); 

 
 

Spi2PutByte(0xD9); 

 

Spi2PutByte(0xF1); 

 
 

/* Turn on VCC and wait 100ms 

 

*/ 

 

PORTClearBits(prtVbatCtrl, bitVbatCtrl); 

 

DelayMs(100); 

 
 

/* Send the commands to invert the display. This puts the display origin 

 

** in the upper left corner. 

 

*/ 

 

Spi2PutByte(0xA1);   

 

//remap columns 

 

Spi2PutByte(0xC8);   

 

//remap the rows 

 
 

/* Send the commands to select sequential COM configuration. This makes the 

 

** display memory non-interleaved. 

 

*/ 

 

Spi2PutByte(0xDA);   

 

//set COM configuration command 

 

Spi2PutByte(0x20);   

 

//sequential COM, left/right remap enabled 

 
 

/* Send Display On command 

 

*/ 

 

Spi2PutByte(0xAF); 

 

 

Display Memory Update 

This function copies the contents of a 512-byte buffer from PIC32 memory to the display. The display memory is 

organized as four pages of 128 bytes each. Each memory page corresponds to an 8-pixel-high stripe across the 

display. Each byte in the memory page corresponds to an 8-pixel-high column on the display. The least significant 

bit in a display byte is the top most pixel, and the most significant bit the bottom most pixel. The first byte in the 

page corresponds to the left most pixels on the display and the last byte the right most pixels. 

 

This function assumes that the display buffer to be copied is the global variable 

rgbOledBmp

 

 

/* ------------------------------------------------------------ */ 
/*** OledUpdate 
** 
** 

Parameters: 

** 

 

none 

** 
** 

Return Value: 

Содержание chipKIT Basic I/O Shield

Страница 1: ...I O Shield provides a range of input output devices for both beginners and advanced users It provides simple digital input devices such as switches and buttons and digital output devices such as discr...

Страница 2: ...be accessed using the digitalRead function 2 Slide Switches Four slide switches provide discrete digital inputs These can be accessed using the digitalRead function 3 J2 Shield Power Connector This co...

Страница 3: ...enables the resistors Removing the shorting blocks disables the resistors 8 J11 I 2 C Daisy Chain Connector This is a 2x4 pin header connector that provides access to the I 2 C signals SDA and SCL as...

Страница 4: ...en The pin is made an output and driven low to turn on the power supply Power on sequence 1 Apply power to VDD 2 Send Display Off command 3 Initialize display to desired operating mode 4 Clear screen...

Страница 5: ...W3 pin 8 and SW4 pin 35 The digitalRead function will return low when the switch is down toward the pushbuttons and high when the switch is up toward the OLED display LEDs There are eight LEDs labeled...

Страница 6: ...ent rating of the shield s power supply whichever is less 2 4 I2 C Bus The I 2 C bus from the chipKIT microcontroller board is brought onto the Basic I O Shield There are two I 2 C devices on the boar...

Страница 7: ...0 Digilent has a library for using the temperature sensor It is contained in document DSD 0000311 chipKIT IOShield Library zip which can be downloaded from the Basic I O Shield product page at www dig...

Страница 8: ...40 84 VBAT_EN OLED VBAT enable 38 82 VDD_EN OLED VDD enable 33 77 LD1 User LED 32 76 LD2 User LED 31 75 LD3 User LED 30 74 LD4 User LED 29 73 LD5 User LED 28 72 LD6 User LED 27 71 LD7 User LED 26 70...

Страница 9: ...itReset BIT_9 Symbols describing the geometry of the display define cbOledDispMax 512 max number of bytes in display buffer define ccolOledMax 128 number of display columns define crowOledMax 32 numbe...

Страница 10: ...nsDigitalOut prtVbatCtrl bitVbatCtrl VBAT power control 1 off Make the RG9 pin be an output On the Basic I O Shield this pin is tied to reset PORTSetBits prtReset bitReset PORTSetPinsDigitalOut prtRes...

Страница 11: ...he commands to select sequential COM configuration This makes the display memory non interleaved Spi2PutByte 0xDA set COM configuration command Spi2PutByte 0x20 sequential COM left right remap enabled...

Страница 12: ...the page address Spi2PutByte 0x22 Set page command Spi2PutByte ipag page number Start at the left column Spi2PutByte 0x00 set low nybble of column Spi2PutByte 0x10 set high nybble of column PORTSetBit...

Страница 13: ...le SPI2STATbits SPITBE 0 Write the next transmit byte SPI2BUF rgbTx Wait for receive byte while SPI2STATbits SPIRBF 0 bTmp SPI2BUF Spi2PutByte Parameters bVal byte value to write Return Value Returns...

Страница 14: ...Mouser Electronics Authorized Distributor Click to View Pricing Inventory Delivery Lifecycle Information Digilent 410 216P KIT 410 216...

Отзывы: