Jump to content

sammichFM OLED Display


RyuX
 Share

Recommended Posts

It's very likely a 4/8 bit thing.

 

The solution would be a modified firmware (I could provide the modification if you are interested) and four wires to J16:D3..D0.

 

Could you please already do this hardware modification?

Connect:

- PIC Pin RE2 to J16:D3

- PIC Pin RE1 to J16:D2

- PIC Pin RB1 to J16:D1

- PIC Pin RB0 to J16:D0

/edit: pinning corrected, this one is working (confirmed by RyuX)

 

Compare following schematic for sammichFM J16 pinning: http://www.midibox.org/dokuwiki/lib/exe/fetch.php?media=sammichfm:sammichfm_base_pcb_rev_1.pdf

And following schematic for PIC pinning: http://www.ucapps.de/mbhp/mbhp_core_v3.pdf

 

Best Regards, Thorsten.

Link to comment
Share on other sites

Hey Thorsten ! Thanks for your reply.

So i just put 4 wires directly from the PIC to the Digital Pins on J16 to the LCD ?

Do i need to cut any traces or just make the new connections in addition ?

 

If i make a firmware update will i have to remodify the firmware? If so could you point me at the part that i need to modify ? Thanks again!!!

Link to comment
Share on other sites

Fortunately there are no tracks routed to J16:D3..D0, therefore you can add the wires without special measures.

 

I'm planning to update the firmware, so that a special flag can be set to enable the 8bit LCD interface option.

I would provide you a special precompiled version for testing - but if you already able to compile by yourself, then this would help me (a bit less effort at my side, especially whenever I provide a new firmware)

 

Note that I won't be able to test the enhancement at my side - I hope that it will work immediately at your side, otherwise I will need some time to buy & try the same OLED.

 

Best Regards, Thorsten.

Link to comment
Share on other sites

I dont know yet how to compile the firmware, havent used any programming languages for ages.

 

Ok will do the wiring tomorrow morning, thanks for your effort, would be really nice to get it working.

 

Thanks and best regards

Patrick

Link to comment
Share on other sites

Thanks Thorsten... will try this version tomorrow after connecting the wires.

 

So basically flashing this firmware should enable the OLED Driver, if i want to use a normal LCD i would flash the standard version again?

 

Will keep you updated on the progress.

This could save my day.

 

Greets

Patrick

Link to comment
Share on other sites

Hello

I did the Mod and flashed the firmware.

 

The normal LCD is not outputting the correct data anymore.

The OLED is at least showing the first R of what i guess should be (RANDOM PATCH) and some chars at the end.

 

Maybe you got a hint ?

Thanks again

 

EDIT: this is the OLED i got http://de.mouser.com/ProductDetail/Newhaven-Display/NHD-0220DZW-AG5/?qs=sGAEpiMZZMshRHSPqbouvFu0giaJJ%252b33TsxIS1Y%252b3Po%3d

post-11067-0-51222600-1403596795_thumb.j

Edited by RyuX
Link to comment
Share on other sites

The driver is selected and running.

But it looks like two wires are swapped.

 

Could you please take an hi-resolution picture of your HW mod, so that I can check if the cables are connected to the right pins?

 

Best Regards, Thorsten.

Link to comment
Share on other sites

I connected them exactly like you wrote before.. also measure continuity again at those points, here is the pic.. 
Maybe i overlooked something.
Thanks

 

 

EDIT: Its working now.. i just randomly tried to Switch the Wire RE1 <-> RE2. Did i read the Shematics wrong ? you wrote:

 

- PIC Pin RE1 to J16:D3

- PIC Pin RE2 to J16:D2

- PIC Pin RB1 to J16:D1

- PIC Pin RB0 to J16:D0

/moderator edit: this is the wrong pinning, documentation has been corrected in TK's posting above

 
Well nevermind.. its working so i am supper happy !! :D

post-11067-0-25249300-1403636019_thumb.j

Edited by TK.
Link to comment
Share on other sites

Thanks again Thorsten.. had to put some more work into it.. because the OLED is not nearly as high as the LCD.. so i had to remount it on the top and solder longer pins to it.

Now finally it looks like the Shruthi XT and fits inside my Studio  :sweat:

 

family2.png

 

 

 

 

 

Thanks for making it possible  :w00t:

 

Best Regards
Patrick

Link to comment
Share on other sites

  • 4 years later...
On 6/23/2014 at 5:18 PM, TK. said:

Ok, crossing fingers!

 

Please try this version: http://www.ucapps.de/mios/midibox_fm_v1_4j__sammichFM_8bitlcd.zip

 

I've enabled the new USE_8BIT_LCD_DRIVER option for the setup_pic18f4685_sammich_fm.hex file only!

 

Best Regards, Thorsten.

Is there any chance someone could fix this link? I just purchased a Vishay OLED for my Sammich, but it seems the wiring modification isn't working. Perhaps my firmware needs updating?

Link to comment
Share on other sites

The pinout is good.
First did you check with standard 4 bit, without USE_8BIT_LCD_DRIVER option?

The controller is OLED-0010(WS0010) and seems to match HD44780 industrial standard BUT in the command table there's something which differs:

commands.gif?raw=1Capture%20d%E2%80%99%C3%A9cran%202019-01
 

Page 22 of the controller datasheet

Maybe I'm wrong but this specific command is nowhere in the LCD initialisation:
 

USER_LCD_Init
    ;; notify that no graphical LCD is connected
    bcf MIOS_BOX_CFG0, MIOS_BOX_CFG0_USE_GLCD

    ; (Initialization of Ports: done in Init_Ports)
    SET_BSR USER_LCD_STATUS
    clrf    USER_LCD_STATUS, BANKED

    movlw   100         ; 100 ms delay
    call    MIOS_Delay

        bcf     USER_LCD_LAT_RW, USER_LCD_PIN_RW    ; LCD_WRITE
        bcf     USER_LCD_LAT_RS, USER_LCD_PIN_RS    ; USER_LCD_PIN_RS_0

    ;; initialize LCD
    movlw   0x38
    movwf   USER_LCD_LAT_D
    rcall   USER_LCD_Strobe_Set
    rcall   USER_LCD_Strobe_Clr
    movlw   50          ; 50 ms delay
    call    MIOS_Delay
    rcall   USER_LCD_Strobe_Set
    rcall   USER_LCD_Strobe_Clr
    movlw   50          ; 50 ms delay
    call    MIOS_Delay
    rcall   USER_LCD_Strobe_Set
    rcall   USER_LCD_Strobe_Clr

    movlw   0x08            ; Display Off
    rcall   USER_LCD_Cmd
    movlw   0x0c            ; Display On
    rcall   USER_LCD_Cmd
    movlw   0x06            ; Entry Mode
    rcall   USER_LCD_Cmd
    movlw   0x01            ; Clear Display
    call    USER_LCD_Cmd
    bcf MIOS_LCD_TIMEOUT1, 7, BANKED    ; everything ok, make sure that LCD_TIMEOUT, bit 7 is cleared
    
    movlw   0x38            ; without these lines the LCD will not work
    rcall   USER_LCD_Cmd        ; correctly after a second USER_LCD_Init
    movlw   0x0c
    rcall   USER_LCD_Cmd
    movlw   0x00            ; set cursor to zero pos
    rgoto   USER_LCD_CursorSet

I think you have to add this command somewhere for "internal DCDC power On"

    movlw   0x17
    rcall   USER_LCD_Cmd

But I don't remember where, in the app_lcd.inc maybe??? Someone knows???
Edit: I don't remember which lcd_init is active,

  • /src/app_lcd.inc
  • /module/app_lcd/clcd/app_lcd.inc
  • /mios/mios_lcd.inc
     

Best
Bruno

 

Edited by Antichambre
Link to comment
Share on other sites

I think I understood what TK did in the FM firmware.
You have to let the 8 bit connections and the USE_8BIT_LCD_DRIVER flag to, this will force the use of the custom driver "app_lcd_8bitdriver.inc" which is in /src/ folder, It's an 8 bit one but it doesn't matter your controller supports it.
Replace that file by the one from my dropbox
https://www.dropbox.com/s/zpdxe6cfrxtmv04/app_lcd_8bitdriver.inc?dl=1  (I added the command in this file.)
 

    movlw   0x08            ; Display Off
    rcall   USER_LCD_Cmd
    movlw   0x0c            ; Display On
    rcall   USER_LCD_Cmd
    movlw   0x06            ; Entry Mode
    rcall   USER_LCD_Cmd
    movlw   0x17	    ; DCDC Power On (OLED-0010 controller only)
    rcall   USER_LCD_Cmd
    movlw   0x01            ; Clear Display
    call    USER_LCD_Cmd
    bcf MIOS_LCD_TIMEOUT1, 7, BANKED    ; everything ok, make sure that LCD_TIMEOUT, bit 7 is cleared
    
    movlw   0x38            ; without these lines the LCD will not work
    rcall   USER_LCD_Cmd        ; correctly after a second USER_LCD_Init
    movlw   0x0c
    rcall   USER_LCD_Cmd
    movlw   0x17	    ;
    rcall   USER_LCD_Cmd
    movlw   0x00            ; set cursor to zero pos
    rgoto   USER_LCD_CursorSet

Compil it, upload and tell me...
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...