Displaying Videos and Images on 4Dsystems uOLED Serially - Page 2


Closed Thread
Page 2 of 2 FirstFirst 12
Results 41 to 68 of 68
  1. #41
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    here is the video of what the $59,$00 command does


  2. #42
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    based on the above video i would like a little bit of help?

    as you see the first picture (the blue "star", actually it is a symbol,but anyway), it dissapear from the screen and then the screen goes off.

    I would like to do something but i dont really know how to use inrerrupt.

    I want to display this symbol every 5 seconds, and when the tag pass from the reader, to display the picture that corresponds to the tag.

    I think this can be done using interrupt but i have never used it and i have read some programs, but cannot understant.

    do you have any simple example using an led flashing and a button that interrupts the process?

    thanks for any help.

  3. #43
    Join Date
    Aug 2006
    Location
    Look, behind you.
    Posts
    2,818


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Interrupts get fast and easy using Darrel's Instant Interrupts, no setting up registers, no latency of PBP interrupts. Which interrupt do you want to use? Look at the data sheet to see what is available for your chip and check out Darrel's webpage:
    http://darreltaylor.com/DT_INTS-14/intro.html
    If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
    .
    Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
    .
    There simply is no "Happy Spam" If you do it you will disappear from this forum.

  4. #44
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    thanks for your help,

    i will check it out.

  5. #45
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    i've been trying to use the interrupt commands but i get a lot of errors. I used both files

    INCLUDE "DT_INTS-14.bas" ' Base Interrupt System
    INCLUDE "ReEnterPBP.bas" ' Include if using PBP interrupts

    First error i get is that micro assembler does not support 16F628a, and it is asking to use the MPASM for compiling.

    then if i use the MPASM i get again a lot of error like the attached pic.

    i dont understand why it says that cannot filnd the pic16f628a.

    here is also my code


    Code:
    '****************************************************************
    '*  Name    : TAG NUMBER.BAS                                    *
    '*  Author  : LEONARDO BILALIS                                  *
    '*  Notice  : Copyright (c) 2011 [LEONARDOS BILALIS]            *
    '*          : All Rights Reserved                               *
    '*  Date    : 11/6/2011                                          *
    '*  Version : 1.0                                               *
    '*  Notes   : this program allows you to see the                *
    '*          : Number of the RFID tag                            * 
    '*          :                                                   *
    '****************************************************************
    @ DEVICE PIC16F628a      
    Include "MODEDEFS.BAS"
    INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ' Include if using PBP interrupts
    CMCON = 7
    ;-----------------------------------------------------------------
    LED   VAR  PORTB.3
      
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler   TMR1_INT,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    T1CON = $31                ; Prescaler = 8, TMR1ON
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    ;-----------------------------------------------------------------
    
    DEFINE OSC 8	'Set oscillator in MHz 
    DEFINE LCD_DREG PORTB  'define port to LCD
    DEFINE LCD_DBIT 4      'RB4 RB5 RB6 RB7 to D4 D5 D6 D7 display
    DEFINE LCD_RSREG PORTA 'RS on porta
    DEFINE LCD_RSBIT 0     'RS on porta.0
    DEFINE LCD_EREG PORTA  'Enable on porta
    DEFINE LCD_EBIT 1      'Enable  porta.1
    DEFINE LCD_BITS 4      ' 
    DEFINE LCD_LINES 2     'lines 2
    PAUSE 200             ' Stop 200ms
    ;----------------------------------
    LCDOUT $FE,1           ' power lcd
    Lcdout $FE,1,4
    lcdout $FE, 1," Copyright 2011"
    lcdout $FE, $C0,"Leonardo Bilalis"
    ;----------------------------------
    
    pause 1000
    low led
    pause 500
    high led
    pause 500
    low led
    pause 500
    high led
    pause 500
    
    ' -----[ Variables ]-------------------------------------------------------
    
    buf	    VAR	byte [10]' RFID bytes buffer
    tagNum	VAR	Byte	 ' from EEPROM table
    idx	    VAR	Byte	 ' tag byte index
    char	VAR	Byte	 ' character from table
    
    Main:
    pause 500
    lcdout $FE,1," Please use your"
    lcdout $FE, $C0,"Personal RFIDTAG"
    pause 500
    SERIN2 portb.1, 84, [WAIT($02),Str buf\10]
    pause 1000
    LCDout $fe,1, "TAG ID:"
    lcdout $fe,$C0, "NO: ", str buf\10
    pause 5000
    goto main
    
    '---[TMR1 - interrupt handler]--------------------------------------------------
    ToggleLED1:
    TOGGLE LED
    @ INT_RETURN
    if you have any suggestion please let me know.

    thanks a lot for your help.
    Attached Images Attached Images  

  6. #46
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    You must use MPASM with DT's interrupts.
    Then you will need to use MPASM type configs
    http://www.picbasic.co.uk/forum/showthread.php?t=543
    Dave
    Always wear safety glasses while programming.

  7. #47
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    thank you very much for you answer,

    i have used the MPASM and the following line

    device pic16F628, @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_ALL & _DATA_CP_ON

    but i'm getting the same errors, could you help please?

  8. #48
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    i used the following config

    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_ALL & _DATA_CP_ON
    @device pic16F628a

    and now i get the following errors
    Attached Images Attached Images  

  9. #49
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Remove

    device pic16F628,
    Dave
    Always wear safety glasses while programming.

  10. #50
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Seems you edited while I was posting.
    now your answer is in the error message.
    read through till you come the the ADD part
    Dave
    Always wear safety glasses while programming.

  11. #51
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    hi Dave again,

    now i get the following errors.

    I dont want to disturb you more.

    I'm really sad to not understand what are these errors and why it does not work.

    regards

    Code:
    '****************************************************************
    '*  Name    : TAG NUMBER.BAS                                    *
    '*  Author  : LEONARDO BILALIS                                  *
    '*  Notice  : Copyright (c) 2011 [LEONARDOS BILALIS]            *
    '*          : All Rights Reserved                               *
    '*  Date    : 11/6/2011                                         *
    '*  Version : 1.0                                               *
    '*  Notes   : this program allows you to see the                *
    '*          : Number of the RFID tag                            * 
    '*          :                                                   *
    '****************************************************************
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _BODEN_ON & _LVP_OFF & _CP_ALL & _DATA_CP_ON
    
    Include "MODEDEFS.BAS"
    INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ' Include if using PBP interrupts
    CMCON = 7
    ;-----------------------------------------------------------------
    LED   VAR  PORTB.3
      
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler   TMR1_INT,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    T1CON = $31                ; Prescaler = 8, TMR1ON
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    ;-----------------------------------------------------------------
    
    DEFINE OSC 8	'Set oscillator in MHz 
    DEFINE LCD_DREG PORTB  'define port to LCD
    DEFINE LCD_DBIT 4      'RB4 RB5 RB6 RB7 to D4 D5 D6 D7 display
    DEFINE LCD_RSREG PORTA 'RS on porta
    DEFINE LCD_RSBIT 0     'RS on porta.0
    DEFINE LCD_EREG PORTA  'Enable on porta
    DEFINE LCD_EBIT 1      'Enable  porta.1
    DEFINE LCD_BITS 4      ' 
    DEFINE LCD_LINES 2     'lines 2
    PAUSE 200             ' Stop 200ms
    ;----------------------------------
    LCDOUT $FE,1           ' power lcd
    Lcdout $FE,1,4
    lcdout $FE, 1," Copyright 2011"
    lcdout $FE, $C0,"Leonardo Bilalis"
    ;----------------------------------
    
    ' -----[ Variables ]-------------------------------------------------------
    
    buf	    VAR	byte [10]' RFID bytes buffer
    tagNum	VAR	Byte	 ' from EEPROM table
    idx	    VAR	Byte	 ' tag byte index
    char	VAR	Byte	 ' character from table
    
    Main:
    pause 500
    lcdout $FE,1," Please use your"
    lcdout $FE, $C0,"Personal RFIDTAG"
    pause 500
    SERIN2 portb.1, 84, [WAIT($02),Str buf\10]
    pause 1000
    LCDout $fe,1, "TAG ID:"
    lcdout $fe,$C0, "NO: ", str buf\10
    pause 5000
    goto main
    
    '---[TMR1 - interrupt handler]--------------------------------------------------
    ToggleLED1:
    TOGGLE led
    @ INT_RETURN
    Attached Images Attached Images  
    Last edited by astanapane; - 11th June 2011 at 18:13.

  12. #52
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    I dont want to disturb you more
    No problem.

    Try changing the config line to
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    and make sure the *.inc file is commented.
    Then add
    wsave VAR BYTE $70 SYSTEM
    in your VAR section
    Dave
    Always wear safety glasses while programming.

  13. #53
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    i have fixed a lot of problems by adding your suggestions.

    Code:
    '****************************************************************
    '*  Name    : TAG NUMBER.BAS                                    *
    '*  Author  : LEONARDO BILALIS                                  *
    '*  Notice  : Copyright (c) 2011 [LEONARDOS BILALIS]            *
    '*          : All Rights Reserved                               *
    '*  Date    : 11/6/2011                                         *
    '*  Version : 1.0                                               *
    '*  Notes   : this program allows you to see the                *
    '*          : Number of the RFID tag                            * 
    '*          :                                                   *
    '****************************************************************
    @ __config _INTRC_OSC_NOCLKOUT & _WDT_ON & _PWRTE_ON & _MCLRE_OFF & _LVP_OFF & _CP_OFF
    wsave   VAR BYTE    $20     SYSTEM      ' location for W if in bank0
    ;wsave   VAR BYTE    $70     SYSTEM      ' alternate save location for W 
                                             ' if using $70, comment wsave1-3
    
    ' --- IF any of these three lines cause an error ?? ------------------------
    '       Comment them out to fix the problem ----
    ' -- Which variables are needed, depends on the Chip you are using -- 
    wsave1  VAR BYTE    $A0     SYSTEM      ' location for W if in bank1
    wsave2  VAR BYTE    $120    SYSTEM      ' location for W if in bank2
    ;wsave3  VAR BYTE    $1A0    SYSTEM      ' location for W if in bank3
    Include "MODEDEFS.BAS"
    INCLUDE "DT_INTS-14.bas"     ' Base Interrupt System
    INCLUDE "ReEnterPBP.bas"     ' Include if using PBP interrupts
    CMCON = 7
    ;-----------------------------------------------------------------
    LED   VAR  PORTB.3
      
    ASM
    INT_LIST  macro    ; IntSource,        Label,  Type, ResetFlag?
            INT_Handler   TMR1_INT,  _ToggleLED1,   PBP,  yes
        endm
        INT_CREATE               ; Creates the interrupt processor
    ENDASM
    
    T1CON = $31                ; Prescaler = 8, TMR1ON
    @ INT_ENABLE  TMR1_INT     ; enable Timer 1 interrupts
    ;-----------------------------------------------------------------
    
    DEFINE OSC 4	'Set oscillator in MHz 
    DEFINE LCD_DREG PORTB  'define port to LCD
    DEFINE LCD_DBIT 4      'RB4 RB5 RB6 RB7 to D4 D5 D6 D7 display
    DEFINE LCD_RSREG PORTA 'RS on porta
    DEFINE LCD_RSBIT 0     'RS on porta.0
    DEFINE LCD_EREG PORTA  'Enable on porta
    DEFINE LCD_EBIT 1      'Enable  porta.1
    DEFINE LCD_BITS 4      ' 
    DEFINE LCD_LINES 2     'lines 2
    PAUSE 200             ' Stop 200ms
    ;----------------------------------
    LCDOUT $FE,1           ' power lcd
    Lcdout $FE,1,4
    lcdout $FE, 1," Copyright 2011"
    lcdout $FE, $C0,"Leonardo Bilalis"
    ;----------------------------------
    
    ' -----[ Variables ]-------------------------------------------------------
    
    buf	    VAR	byte [10]' RFID bytes buffer
    tagNum	VAR	Byte	 ' from EEPROM table
    idx	    VAR	Byte	 ' tag byte index
    char	VAR	Byte	 ' character from table
    
    Main:
    pause 500
    lcdout $FE,1," Please use your"
    lcdout $FE, $C0,"Personal RFIDTAG"
    pause 500
    SERIN2 portb.1, 84, [WAIT($02),Str buf\10]
    pause 1000
    LCDout $fe,1, "TAG ID:"
    lcdout $fe,$C0, "NO: ", str buf\10
    pause 5000
    goto main
    
    '---[TMR1 - interrupt handler]--------------------------------------------------
    ToggleLED1:
    TOGGLE led
    @ INT_RETURN
    now i only get the following

    error [118] overwriting previous address contents [2007]

  14. #54
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Gettin there....
    Take a look at this
    http://www.picbasic.co.uk/forum/show...=6775#post6775
    When the configs are set in code space the *.inc file needs the config lines commented.
    Dave
    Always wear safety glasses while programming.

  15. #55
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    i feel that if i make any change in the inc file under the original device 16f628a i will make a mess.

    when i open the inc file of the 16f628a i cannot save it because access is denied. Is that has to do with my permissions as admin?

  16. #56
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    thank you very much for your time and for your help.

    i fixed it.!!!!!

  17. #57
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    after a long time i would like to add some features on the code i'm currently trying to fix.

    I got an 3.2" ulcd PT from 4DSystems.

    I would like to create a program that i could control an iconic 4x3 keyboard serially from the display.

    For example i would like to add 4x3 buttons and ones i touch them, to get a feedback on the display.

    I have tried to create a very simple program as the start, by creating: Draw Text Button - 62hex, no luck!!!

    the command as from the Manual has the following configuration :

    cmd, state, x(msb:lsb), y(msb:lsb), buttonColour(msb:lsb), font, stringColour(msb:lsb),
    width, height, “string”, terminator


    the problem is that i dont know what to use at x and y as the width and height!

    After that i need to create a touch commands i guess! I have a lot of work.

    It is very confusing and there is no example at all a their site or manuals.

    I will be able to check the code again on Friday because i'm at a business trip (again )

  18. #58
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Hello all,

    i manage to create a displayed only button on the screen.

    My next step is to make the displayed button as an active.

    shown as down pressed : $62 $00 $00 $28 $00 $14 $FF $FF $00 $00 $00 $02 $02 $31 $00

    shown as up not pressed: $62 $01 $00 $28 $00 $14 $FF $FF $00 $00 $00 $02 $02 $31 $00



    Is there anyone made any button active on this screens? If so could you please help me to create one?

    thanks a lot.

  19. #59
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    hi all,

    now i really want your help,

    i'm trying to display 2 or 3 line text at the same time on the uLCD 32 PT.

    i use the following command, but the second line does not show up on the screen.

    If i place a PAUSE in between of 100 then both lines displayed but with a PAUSE 100 delay.

    serout2 lcd,84,[$73,$04,$03,$13,$ff,$ff,"Leonardo Bilalis",$00]
    serout2 lcd,84,[$73,$05,$07,$13,$ff,$00,"Copyright 2011",$00]

    is there any command can help me to display both lines at the same time?

    thanks for your help.

  20. #60
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    Have you tried with carriege return + line feed ? Add 13,10 to the first serout2 command.

    serout2 lcd,84,[$73,$04,$03,$13,$ff,$ff,"Leonardo Bilalis",$00,$0D,$0A]


    Cheers

    Al.
    Last edited by aratti; - 27th November 2011 at 16:07.
    All progress began with an idea

  21. #61
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    i just tried it. It doesnt help.

    What is that ,$0D,$0A doing?

    thanks for your reply!!!

  22. #62
    Join Date
    May 2008
    Location
    Italy
    Posts
    825


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    $0D = carriege return. It just move to the first column
    $0A = new line. It moves to the line below.

    Very likely your display works with pixel coordinate so these commands are useless.

    Try reducing the delay to Find the minimum necessary for having the display working.

    Cheers

    Al.
    All progress began with an idea

  23. #63
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    I did that and works, but it looks like it has a delay for displaying the lines.

    I wonder if there is any other available modification on the code in order to display both.

    thanks for your kind help.

  24. #64
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    ok it does not matter this a lot, i can stand with that. Now i need to create some active touch buttons on the screen. Once i manage to do it, i will let you know.

    thanks.

  25. #65
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    ok lets go back to my previous question first and then i move on to the touch buttons.

    first of all i have been in touch with the guys from 4D system. I have asked them how is it possible to display two line at the same time.

    They told me that the display has a TX output that send to the microcontroller a signal of ACK $06.

    So the microcontroller needs to wait first for the ACK and then to check the second command and display both at the same time.

    Is there any example here in the forum that can guide me how to wait for the ACK of an exernal device?

    I guess that has to do with serial in and serial out ports.

    So what i have to do is that one i send the comand to the display, i need to wait on the RX on microcontroller the right $06. If it read that it is right then i move on the next command.

    could you please help me a bit?

    thanks,


  26. #66
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,027


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    use identifier WAIT(6) in your SERIN2 or HSERIN command.

    Ioannis

  27. #67
    Join Date
    Oct 2010
    Posts
    411


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    thanks Ioannis

  28. #68
    Join Date
    Nov 2006
    Location
    Murrieta, CA
    Posts
    62


    Did you find this post helpful? Yes | No

    Default Re: Displaying Videos and Images on 4Dsystems uOLED Serially

    If your referring to the uLCD-32PT. i recommend not use the display as a serial terminal. it has a very nice processor on board that will handle all of your touch commands. With the addition of the 4D-VISI putting graphs and buttons on the display is just simple click and drag. Of course we are talking 4DGL language, however once you have the display process the touch commands you can spit that out to serial so your pic micro can take over.. I will post my project if 4D systems ever get their freaking carrier boards in stock.
    There are 10 kinds of people. Those that know binary and those that do not.

Members who have read this thread : 0

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