Jump to content
bluehash

43oh Nokia 1202 LCD Display BoosterPack

Recommended Posts

Also this STE2007 controller is reportedly compatible with ST7565 per http://forum.arduino.cc/index.php/topic,108631.0.html ... and the U8Glib arduino library supports that, so maybe I should look at porting that instead.

 

edit: u8glib looks like a can of worms, and possibly too heavy for the G2553 and below value line chips...

Share this post


Link to post
Share on other sites

Side note, I am definitely looking at the Nokia 1202 LCD like I do the nRF24L01+ (cheap chinese modules anyhow).  It's super cheap, easy to solder/incorporate, and can be thrown into super low-power mode (just read the STE2007 datasheet closer, in Power Saver mode the logic circuits draw ~1-3uA and the analog circuits are shut off I believe; active mode it's ~200uA or so according to the dangerousprototypes thread, with backlight off of course).  Just went in for an order of 20 LCDs from aliexpress.com.  $1.55/piece shipped.

 

Similar to the nRF, the way I see it I'd be a fool NOT to incorporate it into my personal one-off projects.  A button to signal the MCU to turn the LCD on/off and my remote sensor MCUs can report their state to me right there and then without having to haul it back to the workbench or wait for a radio update.  Will cook up more project ideas incorporating this soon.

 

Only drawback is the minimum voltage is 2.4V, not quite as much battery range as the nRF24 (which goes down to ~1.9V similar to the MSP430's ~1.8V)

Share this post


Link to post
Share on other sites

Posted an initial C library for support here- http://forum.43oh.com/topic/3932-nokia-1202-ste2007-skeleton-driver/

 

Thinking about what to do with Energia, might fork the SPI code into a special SPI9 driver with a .transfer9() function to support 9-bit SPI for all the various supported subsystems, then use that for Nokia1202 support with Rei Vilo's LCD_screen.

Share this post


Link to post
Share on other sites

Is this for a new BP? Cause I can easily have it sponsored. Parts+PCB.

Not particularly, just a stash for my parts bin for personal projects.  OTOH 20 is a lot of LCDs, if you'd like to do another groupbuy I could offer up 10 of them for it once I get them.

Share this post


Link to post
Share on other sites

Received my shipment of 20-

 

post-15991-0-11148800-1370995169_thumb.jpg

 

This was the order: http://www.aliexpress.com/item/LCD-for-Nokia-1202-Free-Shipping-Liquid-Crystal-Display-High-Quality/359363681.html

 

I'll note that I ordered these on 6/1.  10 days later!  Wow.

Only issue I see is I'm not sure those casings are antistatic... and they were wrapped in toilet paper, lol!  Will have to see once I get the new boosterpack from bluehash if I can do a press-fit test of the header to test them all.

Share this post


Link to post
Share on other sites

Got my sample of the new design! Thanks bluehash!

Found one minor glitch upon inspection--the "solder jumper" for SPI MOSI has the GND plane infiltrating the solder-unmask window around it. Be careful when cutting that trace that you don't accidentally short it to GND. Will fix that for a next revision.

Going to take high-res pics when I get the chance and produce documentation on how to use the rats nest of pads & jumpers on the back :grin:

edit: Also the silkscreen box framing the LCD position needs to be shifted 1mm, updating my pattern.  (just tried lining up one of my displays to it)

Sent from my Galaxy Note II with Tapatalk
 

Share this post


Link to post
Share on other sites

Pics of the boosterpack all built out-

 

 

post-15991-0-76486200-1371695513_thumb.jpg

Used hot glue to secure the LCD.

 

post-15991-0-91721200-1371695519_thumb.jpg

Wasn't too bad.  The pads used for the transistor's resistors and the switch-debounce resistors are close enough for 0603 but large enough for 1206... barely (need some flux to make the solder reflow up around the pads) but it works.  Probably ideal for 0805.

 

Managed to take a 1x3 right-angle PTH header and bend it into a right-angle SMD header and use that for the SPI MOSI.  Very nice having it that way (good call @@mbeals !).  I opted to forego the backlight-ON header (mainly cause I couldn't repeat the PTH-rightangle to SMD-rightangle trick again without destroying a 1x2 header set) but no biggie, P2.5 still does the trick.

 

I like having P2.3-P2.5 used for this since P2.0-P2.2 is used by default for my Nordic boosterpack and probably others.  Should stack up cleanly.

 

Verifying it works in USCI mode with a G2553 and the test_terminal.c from the terminal/ subdir of my msp1202 library -- https://github.com/spirilis/msp1202

post-15991-0-55085500-1371695525_thumb.jpg

 

I did find that the contrast is a bit heavier on this one, though that has nothing to do with the board and everything to do with the LCD.  Every one's gonna be different I guess.  I manually added a call to ste2007_contrast(8); to lower the contrast (default is 16, range is 0-31)

 

Code for that:

#include <msp430.h>
#include <stdint.h>
#include "chargen.h"
#include "usci_spi.h"

int main()
{
        WDTCTL = WDTPW | WDTHOLD;

        DCOCTL = CALDCO_16MHZ;
        BCSCTL1 = CALBC1_16MHZ;
        BCSCTL2 = DIVS_1;  // SMCLK = DCO/2 (8MHz)

        //__delay_cycles(8000);  // Short delay to let the LCD wake up -- turns out this isn't necessary
        // Chip select
        P2DIR |= BIT0;
        P2OUT |= BIT0;  // Drive it high to disable LCD
        // Backlight
        P2DIR |= BIT5;
        P2OUT |= BIT5; // Turn on backlight

        spi_init();
        msp1202_init();
        ste2007_contrast(8);
        msp1202_puts("Hi there my\n");
        msp1202_puts("name is Eric.\n");
        msp1202_move(8, 0);

        while(1) {
                __delay_cycles(16000000);
                msp1202_puts("txt 1");
                __delay_cycles(16000000);
                msp1202_puts("txt 2");
        }

        LPM4;

        return 0;
}

void test_chipselect(uint8_t onoff)
{
        P2OUT = (P2OUT & ~BIT0) | (onoff & 0x01);
}

Share this post


Link to post
Share on other sites

Pushbuttons with HW debounce work well:

#include <msp430.h>
#include <stdint.h>
#include "chargen.h"
#include "usci_spi.h"
#include "lcd_printf.h"

int main()
{
        WDTCTL = WDTPW | WDTHOLD;

        DCOCTL = CALDCO_16MHZ;
        BCSCTL1 = CALBC1_16MHZ;
        BCSCTL2 = DIVS_1;  // SMCLK = DCO/2 (8MHz)

        //__delay_cycles(8000);  // Short delay to let the LCD wake up -- turns out this isn't necessary
        // Chip select
        P2DIR |= BIT0;
        P2OUT |= BIT0;  // Drive it high to disable LCD
        // Backlight
        P2DIR |= BIT5;
        P2OUT |= BIT5; // Turn on backlight
        // Pushbuttons
        P2DIR &= ~(BIT3 | BIT4);
        P2OUT |= BIT3 | BIT4;
        P2REN |= BIT3 | BIT4;
        P2IES |= BIT3 | BIT4;
        P2IFG &= ~(BIT3 | BIT4);
        P2IE |= BIT3 | BIT4;

        spi_init();
        msp1202_init();
        lcd_printf("Hi there my\n");
        lcd_printf("name is Eric.\n");
        _EINT();

        while(1) {
                if ( (~P2IN) & (BIT3|BIT4) ) {
                        if (!(P2IN & BIT3)) {
                                lcd_printf("S1 pressed\n");
                        }
                        if (!(P2IN & BIT4)) {
                                lcd_printf("S2 pressed\n");
                        }
                }
                LPM4;
        }

        return 0;
}

void test_chipselect(uint8_t onoff)
{
        P2OUT = (P2OUT & ~BIT0) | (onoff & 0x01);
}

#pragma vector = PORT2_VECTOR
__interrupt void P2_IRQ (void) {
        if (P2IFG & (BIT3|BIT4)) {
                P2IFG &= ~(BIT3 | BIT4);
                __bic_SR_register_on_exit(LPM4_bits);    // Wake up
        }
}

Tested this code, no bounce, every button registers exactly 1 line of text.

 

Yeah, I guess I like my toy :)  Time for some project ideas using this & a menu system or something.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×