Jump to content
43oh

reaper7

Members
  • Content Count

    174
  • Joined

  • Last visited

  • Days Won

    8

Reputation Activity

  1. Like
    reaper7 got a reaction from sq7bti in [Energia Library] Nokia 5110 LCD BoosterPack/Breakout PCB   
    about 2:
    I think that the lines:
    CS_LOW and CS_HIGH are not needed
    when you replace SPI.transfer((char)c);
    by another call: SPI.transfer(_pinChipSelect, (char)c);
    which execute SPIClass::transfer(uint8_t ssPin, uint8_t data) -> SPIClass::transfer(uint8_t ssPin, uint8_t data, uint8_t transferMode)
    where lines:
    169 sets CS 5110 to LOW and
    176 sets CS 5110 back to HIGH
  2. Like
    reaper7 got a reaction from Rei Vilo in [Energia Library] Nokia 5110 LCD BoosterPack/Breakout PCB   
    @Rei Vilo - two comments:
    1. in example LCD_5110_SPI_main.ino for LM4F120H5QR (line 93)
    command SPI.begin(2); sets ssPin to 2(PB_5) but above is set to PA_7.
    Maybe this mean a spi bus number, but in this case we need set first:
    SPI.setModule(2);
    SPI.begin(PA_7); or SPI.begin(10);
     
    BTW - maybe we also don't need to set:
    pinMode(_pinChipSelect, OUTPUT);
    inside LCD_5110_SPI.cpp->void LCD_5110_SPI::begin()...
    because in SPI.cpp->void SPIClass::begin(uint8_t ssPin)
    is set to OUTPUT too...
     
    2. in LCD_5110_SPI.cpp void LCD_5110_SPI::write(uint8_t dataCommand, uint8_t c) {     digitalWrite(_pinDataCommand, dataCommand);          digitalWrite(_pinChipSelect, LOW);     SPI.transfer((char)c);     digitalWrite(_pinChipSelect, HIGH); } I think it should look like:
    void LCD_5110_SPI::write(uint8_t dataCommand, uint8_t c) {     digitalWrite(_pinDataCommand, dataCommand);     SPI.transfer(_pinChipSelect, (char)c); } because procedure SPI.transfer automatically sets ssPin to LOW before send data and
    after sets ssPin to HIGH (of course if You dont set transferMode to SPI_CONTINUE )
     
    I have tested this solution and it works properly with other device (nRF24L01+) in the same spi bus
  3. Like
    reaper7 reacted to Rei Vilo in [Energia Library] Nokia 5110 LCD BoosterPack/Breakout PCB   
    Here is a library for the Nokia 5110 display on Energia using hardware SPI. Speed is faster!
     
    Enjoy
        Distribution.zip
  4. Like
    reaper7 reacted to lawrence_jeff in Launchpad USB example and documentation additions/labs   
    For those of you attempting to build USB devices I put together some Launchpad examples as well as a lab type walkthrough of how to create custom devices (mainly HID)
     
    Included
     
    1) Examples ported to the Launchpad  - Mouse, Keyboard, Composite
    2) Updated HID header file with additional device and usage types
    3) A new device type called usbdhidcustom - This allows you to make new devices with minimal code changes
    4) A complete document in lab type format where you build a volume control device, a gamepad and a keyboard + mouse
    5) Completed projects to go with the labs
     
     
     
     
     
    StellarisWare.zip
  5. Like
    reaper7 got a reaction from bluehash in 7110 LCD SPI   
    You can add to 5110LCD.h before void LCDSendChar... something like this to write string at X,Y

    void LCDSendText(short col, short row, char *string) { LCDGotoXY(col, row); while (*string) { LCDSendChar(*string); string++; } }
×
×
  • Create New...