Neat NKK OLED Rocker Switches - ASM Initialization


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2010
    Posts
    50

    Default Neat NKK OLED Rocker Switches - ASM Initialization

    I thought they were cool so I decided to include one in one of my projects......Might be sorry for the choice. I new from the beginning to keep it simple, but I just couldn't resist. So, after I read all the documentation and typed up my first, second, and third attempts to get it to function, I asked NKK for some example code for initialization. Good news, they gave me some! Bad news, it is in the foreign language of Assembly. So now either I figure out how to embed it in my program or I decipher it to PBP3. Any suggestions (other than learn Asm)? Their sample code is attached (I hope).
    Attached Files Attached Files

  2. #2
    Join Date
    Sep 2010
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: Neat NKK OLED Rocker Switches - ASM Initialization

    Can anyone tell me if it looks like I am on the right track? This is the first part of the initialization translated from assembly to pbp.

    INITOLR:

    O_XCS = 0 'set lata.5 to low to select the OLED
    O_AO = 1 'data sheet has set high for command (latc.6)
    shiftout OSPI_DAT, OSPI_CLK,MSBFIRST,[$2]
    O_AO = 0 'set low for data
    shiftout OSPI_DAT, OSPI_CLK,MSBFIRST,[$0]
    O_XCS = 1 'set a.5 high to delect the OLED
    @ NOP

    .....and all the rest.

  3. #3
    Join Date
    Sep 2010
    Posts
    50


    Did you find this post helpful? Yes | No

    Default Re: Neat NKK OLED Rocker Switches - ASM Initialization

    Well, I dusted off the assembly dust on my brain (PIC18F46K22_STALL.pbp.txt) (I think) and converted to pbp. The display is still blank and off, but the internal switches work so I think I have it connected correctly. Using a PIC18F46K22 since the logic level for the display is ~3.3V. Assembly to PBP3 initialization code attached. Anybody got some ideas of what to try next?

    http://www.nkkswitches.com/oled-rocker-switch.aspx

Similar Threads

  1. Pin initialization question
    By rocket_troy in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 18th July 2012, 00:13
  2. Nice neat code posts
    By Charles Linquis in forum mel PIC BASIC Pro
    Replies: 39
    Last Post: - 18th September 2011, 22:54
  3. Driving a SmartDisplay? (NKK)
    By astouffer in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 1st December 2008, 16:26
  4. I neat some help on 12F675 ad
    By Kmt in forum mel PIC BASIC Pro
    Replies: 2
    Last Post: - 22nd November 2007, 18:48
  5. 18f452 initialization
    By Moldava in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 20th June 2004, 14:46

Members who have read this thread : 1

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts