Shop OBEX P1 Docs P2 Docs Learn Events
PropBasic & PASD isuue — Parallax Forums

PropBasic & PASD isuue

SpillerSpiller Posts: 52
edited 2010-12-16 09:15 in Propeller 1
Hi All,

I'm a fan of Parallax product. I used SX chips with SX/B for years before. Now I'm building my application with Propeller chips. I have built my own HW. ( Propeller chip, I2C EEPROM. 3.3 regulator, some RC components for sigma-delta ADC and XOR gates for timer PWMs.) I have not integrated the USB-RS232 HW onto this small board, it is a separate plug. This HW works fine by using PropBasic with the BST. (My application status LED working well.) I like to use a serial ADC with SHIFTOUT and SHIFTIN commads, but it seems to be it is not working properly. (This HW configuration was working well in my older SX/B application.) I like to debug this issue with PASD. After I have dowload the the spin code genereted by PropBasic compiler by pressing F2 in PASD it gets the ASM code but says COM port not found. I tried to set the PORT manually but got the same issue.
I have download the latest PASD too (Ver 07) but it not solved my problem. What can be the problem? My own HW?
I have a PropStick too Ibut have not tried the PASD with this. May it help?
Can be a FTDI chip or driver issue? ( Although I downloaded the latest USB driver from the Parallax too.)
I have some additional problems too:
How the syntax highlighting working in BST for PropBasic? I can not set it up. I have black and white window only. I shaw syntax highlighted PropBasic code in the web. How it can happed?
Other problem:
Using the LOCKs in PropBasic
I did not see any sample code with using them. Can any one send me sample?

Best Regards

Spiller

Comments

  • BeanBean Posts: 8,129
    edited 2010-12-16 04:12
    Spiller,
    PropBasic has "LOCKNEW", "LOCKRET", "LOCKSET", and "LOCKCLR" commands. These work like the spin commands.

    As for the SHIFTIN and SHIFTOUT problems, we'll need to see some code and a schematic to help with that.

    Make sure you get the latest BST bst-0.19.4-pre14 from http://www.fnarfbargle.com/bst/snapshots/

    Bean
  • SpillerSpiller Posts: 52
    edited 2010-12-16 04:44
    Hi Bean,

    Thaks for the qiuck answer. I have an earliest. I will update it. I have attached a part of my shematic. (AD converter and Propeller wiring)

    Best Regards

    Spiller
    627 x 475 - 388K
  • SapiehaSapieha Posts: 2,964
    edited 2010-12-16 06:09
    Hi Spiller.

    If Yours EEProm are one that You have on SCH (24C128 = 16KB) that give You problems.
    You need 24C256 = 32KB else other type that have 32KB
  • SpillerSpiller Posts: 52
    edited 2010-12-16 07:34
    Hi Sapieda,

    This EEPROM is not the Boot EEPROM because it is side the PPROPELLER COMPUTER MODUL can' tsee in this schematic.

    Best Regards
  • BeanBean Posts: 8,129
    edited 2010-12-16 07:47
    Here is the code I used for the MCP3204
    TASK ReadEFC ' Reads EFC ADC. Puts value in passEFCVal.
    
      inValue  VAR LONG
      outValue VAR LONG
      filter   VAR LONG = 0
    
      HIGH ADC_Cs
      LOW ADC_Clk
      PAUSE 5
      DO
        LOW ADC_Cs    ' Enable MCP3204
        PAUSEUS 100
        SHIFTOUT ADC_Din, ADC_Clk, MSBFIRST, %11000\5 ' Select CH0, Single-Ended
        SHIFTIN ADC_Dout, ADC_Clk, MSBPOST, inValue\13  ' Read ADC
        HIGH ADC_Cs       ' Disable ADC
        LOW ADC_Clk
        outValue = filter / 16
        WRLONG passEFCVal, outValue ' set to 16 bit filtered value
        outValue = outValue / 16
        filter = filter - outValue
        filter = filter + inValue
        PAUSE 1
      LOOP
    
    ENDTASK
    

    This has some filtering in it too, but the "inValue" variable holds the value from the ADC. You may have to change it slightly for the MCP3202.

    Bean
  • SpillerSpiller Posts: 52
    edited 2010-12-16 07:49
    Hi All,

    I have dowloaded the latest BST, but the PASD COM port issue still exists.

    I attached my PropBasic code and the PASD COM Port error screen shot.

    Best Reagards

    Spiller
    1024 x 768 - 440K
  • AribaAriba Posts: 2,690
    edited 2010-12-16 08:32
    Hello Spiller

    Does PASD also not find the COM if you start PASD alone without any other Program running?
    You need to set the right COM port in the COM menu. Then you can test it with COM Open/Close in the COM menu.
    With SaveSettings in the File menu you can store the COM number, so you don't need to set it every time.

    What is this "SMCWPCI-G11.." program on your Taskbar? Does this perhaps scan COM ports to sync with some device?

    Andy
  • SpillerSpiller Posts: 52
    edited 2010-12-16 08:53
    Hi Ariba,

    Thanks, I will try this.

    The "SMCWPCI-G11.." is my WIFI Port

    Best Regards

    Spiller
  • SpillerSpiller Posts: 52
    edited 2010-12-16 09:15
    Hi Ariba,

    It is working now. I'm happy! I don't know why the PASD wanted to connect to COM Port 6, while the Popeller was on COM Port 4. I have set it up now and works.

    Thanks Ariba

    Spiller
Sign In or Register to comment.