VINCULUM - Vmusic2 - Vdrive2 - Help


Closed Thread
Results 1 to 11 of 11

Hybrid View

  1. #1
    Join Date
    May 2010
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    I have the hardware but not at my current location, thus my handicap.

    As for timing I had thought of that and put delays in there but it didn't seem to help, but I might revisit that area. Until then I'll cross my fingers that someone else around these parts might be able to toss a lead as to why it's not working.

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


    Did you find this post helpful? Yes | No

    Default

    This has been bugging me enough to dig out a VDIP1 and take it along with me.

    Here is what I got working. First off the "flash stick" was loaded with a file named VOLUME.TXT with 10:255 written in it so I think we are using the same file.

    I do not have a VDIP Music module so this is working with a standard VDIP1. The attachment shows the firmware setting.
    Name:  VDIP_FIRM.png
Views: 711
Size:  34.6 KB
    Below is my complete code. The long pauses are just there to make sure the VDIP is initialized before sending any commands to it.
    The LCD displays 10 for VAR VOL and 255 for VAR VOL2.
    I hope this helps.
    Code:
    '  18F6680  VDIP
    ' 1384 BYTES
        DEFINE OSC 20
        @ __CONFIG    _CONFIG1H, _OSC_HS_1H
        @ __CONFIG    _CONFIG2H, _WDT_OFF_2H & _WDTPS_128_2H
        @ __CONFIG    _CONFIG4L, _LVP_OFF_4L
        DEFINE LCD_DREG     PORTG
        define LCD_DBIT     0
        DEFINE LCD_RSREG    PORTE
        DEFINE LCD_RSBIT    0
        DEFINE LCD_EREG     PORTE
        DEFINE LCD_EBIT     1
        DEFINE LCD_BITS     4
        DEFINE LCD_LINES    4                         
        DEFINE LCD_COMMANDUS    3000
        DEFINE LCD_DATAUS   150
        
        RXD     VAR PORTE.2    'VDIP PIN 6 - DATA FROM VDIP
        TXD     VAR PORTE.3    'VDIP PIN 8 - DATA TO VDIP
        FLOW    VAR PORTE.4    'VDIP PIN 9 - VDIP RTS
        VOL     VAR BYTE
        VOL2    VAR BYTE
        
        PAUSE 5000
        PAUSE 5000   'SAFE START UP TIME FOR VDIP
        LCDOUT $FE,1,"MACKRCKIT"
        lcdout $FE,$D0," U.S.A."
    
        'INTIALIZE VDIP STICK
        HIGH TXD
        PAUSE 5
        SEROUT2 TXD,84,["ECS",13] 
        HIGH TXD
        PAUSEUS 10
        SEROUT2 TXD,84,["IPA",13]
        HIGH TXD
        PAUSEUS 10
        WAIT11:IF FLOW = 1 THEN WAIT11
        
        START:PAUSE 5000
        serout2 TXD, 84, ["OPR VOLUME.TXT", 13] 'open file
        WAIT01:IF FLOW = 1 THEN WAIT01
        serout2 TXD, 84, ["RD VOLUME.TXT", 13]  'read file
        SERIN2 RXD, 84, [DEC VOL,DEC VOL2]    
        WAIT13:IF FLOW = 1 THEN WAIT13
        serout2 TXD, 84, ["CLF VOLUME.TXT", 13]  'close file
        GOSUB DISPLAY
        GOTO START
        
        DISPLAY:
        LCDOUT $FE,1,"VOL ",DEC VOL
        lcdout $FE,$C0,"VOL2 ",DEC VOL2
        lcdout $FE,$D0," U.S.A." 
        PAUSE 250
        RETURN
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    May 2010
    Posts
    9


    Did you find this post helpful? Yes | No

    Default

    Dave thanks for continuing to look into this, I set it aside right now as it was frustrating me too much, but I will give you code a shot in the next few days and see what happens. I will re-breadboard it later this week and give your code a try.

    The only settings that differ on my setup is that I wasn't using CTS/RTS flow detection, but just the same I'm getting responses from the Vmusic (like the "Stopped" to signify end of song) so i know that communication both ways is working.

    Again thanks for the help, I'll let you know if it works.
    Last edited by Allister; - 24th May 2010 at 13:22.

Members who have read this thread : 0

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

Posting Permissions

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