[SOLVED !] proton basic flex lcd library


+ Reply to Thread
Results 1 to 3 of 3

Thread: proton basic flex lcd library67 days old

  1. #1
    Junior Member davutnacikaya's Avatar
    Join Date
    Mar 2019
    Posts
    31
    Thumbs Up
    Received: 1
    Given: 5
    Total Downloaded
    239.63 MB

    0 Not allowed!

    Default proton basic flex lcd library

    I would like to share with you the flex lcd code developed for Proton Basic. You can now use the pin you want for the lcd connection.

    Proton Basic Source Code:

    Code:
    '************************* elektroinfo.org *************************'************** proton basic flex lcd 2*16 library *****************
    Device = 16F877A
    Declare Xtal = 4
    'You may need to add config and mcu select :-)
    Symbol lcd_data_pin_4=PORTB.4 'Replaceable flex lcd pins
    Symbol lcd_data_pin_3=PORTC.5
    Symbol lcd_data_pin_2=PORTD.2
    Symbol lcd_data_pin_1=PORTB.1
    Symbol lcd_rs_pin=PORTC.1
    Symbol lcd_en_pin=PORTD.6
    
    
    Declare Adin_Res 8 'Measuring 8 bits      
    Declare Adin_Stime 50      
    Declare Adin_Tad FRC  
    TRISA = %00000001 'The measured an0 pin, the reading is sent to the 2nd line
    TRISB = %00000000 
    TRISC = %00000000
    TRISD = %00000000
    TRISE = %00000000
    PORTA=0
    PORTB=0
    PORTC=0
    PORTD=0
    PORTE=0
    
    
    Dim I As Byte
    Dim temp As Byte
    Dim tempmeasure As Byte
    Dim tempa As Byte
    Dim tempb As Byte
    Dim tempc As Byte
    Dim ascia As Byte
    Dim ascib As Byte
    Dim ascic As Byte
    
    
    Include "PROTON-FLEX-LCD.inc"  'This file must be in the same folder as the bass file
    
    
    GoSub lcdsetup
    GoSub first_line
    
    
    For I=0 To 14 Step 1
    temp = LookUpL I,["PROTON FLEX LCD"] 'Text sent to lcd
    rs=1
    GoSub send_lcd
    Next
    
    
    adc_m: 'Adc calculation
    ADcIn 0,tempmeasure
    DelayMS 10
    ascia=tempmeasure/100    
    tempa=tempmeasure/10     
    tempb=tempa/10       
    tempc=tempb*10       
    ascib=tempa-tempc    
    tempa=tempa*10       
    ascic=tempmeasure-tempa  
    ascia=ascia+48
    ascib=ascib+48
    ascic=ascic+48 
    GoSub second_line
    
    
    rs=1
    temp=ascia
    GoSub send_lcd
    temp=ascib
    GoSub send_lcd
    temp=ascic
    GoSub send_lcd
    GoTo adc_m
    End
    Proton Basic Flex Lcd INC file:

    Code:
    '************************* elektroinfo.org *************************'***************** proton basic flex lcd library *******************
    Dim rs As Byte
    Dim stp As Byte
    stp=2
    
    
    GoTo exit_library
    
    
    lcdsetup:
    Output lcd_data_pin_4
    Output lcd_data_pin_3
    Output lcd_data_pin_2
    Output lcd_data_pin_1
    Output lcd_rs_pin
    Output lcd_en_pin
    
    
    rs=0
    temp=51
    GoSub send_lcd
    temp=50
    GoSub send_lcd
    temp=40
    GoSub send_lcd
    temp=12
    GoSub send_lcd
    temp=3
    GoSub send_lcd
    temp=1
    GoSub send_lcd
    rs=0
    temp=128
    GoSub send_lcd
    Return
    
    
    send_lcd:
    lcd_data_pin_4=temp.7
    lcd_data_pin_3=temp.6
    lcd_data_pin_2=temp.5
    lcd_data_pin_1=temp.4
    lcd_rs_pin=rs
    lcd_en_pin=1
    DelayMS stp
    lcd_en_pin=0
    DelayMS stp
    lcd_data_pin_4=temp.3
    lcd_data_pin_3=temp.2
    lcd_data_pin_2=temp.1
    lcd_data_pin_1=temp.0
    lcd_rs_pin=rs
    lcd_en_pin=1
    DelayMS stp
    lcd_en_pin=0
    DelayMS stp
    Return
    
    
    first_line:
    rs=0
    temp=128
    GoSub send_lcd
    Return
    
    
    second_line:
    rs=0
    temp=192
    GoSub send_lcd
    Return
    
    
    exit_library:
    Source: https://www.elektroinfo.org/2020/03/...tuphanesi.html
    Attached Thumbnails Attached Thumbnails proton-basic-flex-lcd-library.jpg‎  

  2. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  3. #2
    Prolific Poster joesaliba's Avatar
    Join Date
    Sep 2004
    Posts
    2,560
    Thumbs Up
    Received: 76
    Given: 33
    Total Downloaded
    6.56 GB

    1 Not allowed!

    Default Re: proton basic flex lcd library

    Proton already have these in it's command. Look at Alphanumeric Declares, page 413 of the manual.

    Click image for larger version

Name:	LCD_DataX_Pin.jpg
Views:	19
Size:	19.9 KB
ID:	3910
    Regards

    Joseph

  4. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

  5. #3
    Junior Member davutnacikaya's Avatar
    Join Date
    Mar 2019
    Posts
    31
    Thumbs Up
    Received: 1
    Given: 5
    Total Downloaded
    239.63 MB

    0 Not allowed!

    Default Re: proton basic flex lcd library

    I didn't know this feature was available :-)

  6. Attention

    This valuable resource relies upon the very small amount of revenue generated by displaying online advertisements to our visitors.

    The advertisements we display are relevant to this web site and your browsing history

    Please consider supporting us by disabling your ad blocker.


    Note: Some users have reported issues related to ad-blockers rendering parts of this wesite unusable,
    where possible we will rectify the issues to enable you to use this resource with adblocking enabled.

    If you can, please report issues in the forum area WebSite / Forum Issues


    Thank you for your attention.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. PIC Basic to Proton Basic Convertion
    By CocaColaKid in forum Absolute Beginners Section
    Replies: 20
    Last Post: 21st December 2019, 15:54
  2. [SOLVED !] need to find a good vibration or flex sensor
    By rverm in forum The Lounge
    Replies: 8
    Last Post: 29th November 2012, 04:01
  3. [SOLVED !] Proton Development Suite/ BASIC Compiler Features/Library
    By Unregistered in forum Pre-Sales and Upgrade Questions
    Replies: 10
    Last Post: 16th October 2010, 15:41
  4. Is Proton's Basic the same as MeLab's Basic
    By johnchristensen in forum Proton Plus Compiler v3
    Replies: 17
    Last Post: 5th August 2007, 15:53
  5. converting from another basic to Proton Basic
    By Weird in forum Proton Plus Compiler v3
    Replies: 1
    Last Post: 17th April 2005, 21:36

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