Spin and PWM; Abandoned

12346»

Comments

  • What is a subroutine name.
  • I added a new pub serial to my earlier post but got an error."must have a subroutine name" . Below is a new pub serial offending code is Getlong
    pub  serial
       ser.str( string("value1:"))
       ser.Dec(EW_PLS)
       ser.str( string("value2:"))
       ser.Dec(EW_Dir)
       ser.str( string("value3:"))
       ser.Dec(SN_PLS)
       ser.str( string("value4:"))
       ser.Dec(SN_Dir)
    
       ewpulse := ser.Getlong
       outa[EW_Dir] := Getlong
       nspulse := ser.Getlong
       outa[NS_Dir] := ser.Getlong
    
  • Why don't you post the entire code you have now, instead of a few lines here and there. I have a two prop working code full duplex. In the code I use any two pins Tx and Rx., not through the FT231, they self syn. pretty reliable if you boot up the two props from the same power supply.
  • The earlier full code is about mid page On page five.The two arrre on same power sourse separated by 2 meters.
  • I"m glad you made it easy
  • This code compiles. I had to comment out some of your unassigned variables. Use Full duplex serial "plus"
    for the Getlong Putlong etc.
  • I don't understand unassigned variables ,i wanted all variables listed .Two variables for each motor . Two bytes for the ascension motor(1 pulse and 1 direction) and two for the declination I tried to compile but the compiler can't find FullDuplexSerialPlus in ythe library or in the work folder. How do I find And install. I checked the github repository but didn't understand it.
  • I modified and ran your code. The button pins work, for example if you pull pin 6 to high your get 50 hz. PWM on pin 16. I ran the serial on its own cog and you can view it on the Tera. terminal or Putty. In your serial code you have ser.Dec(NS_Dir) etc. all that shows is the pin number from your CON #15 and not its state wether it's high or low.
    Anyway here is the Full duplex plus. You will have to figure it out. I'm just a fellow nerd on here offering advice. If you want custom working code to your specs. that cost $$$$.
  • I have found copies of "FullDuplexSerialPlus.spin and have been trying to install them into the prop.tool 1.3.2 library but no luck. how do I do this.
  • I copied the FullDuplexSerialplus.spin from the post above to my downloads folder (I'm using Windows 10).

    Then I copied it from there to the following folder:
    :\Program Files (x86)\Parallax Inc\Propeller Tool v1.3.2\Library

    When I tried to paste it in the library folder I got a message saying only an administrator could paste in that folder. I am an administrator so I just continued.

    If I wasn't an admin, I also saved it by right clicking on it in the downloads folder and clicking on "open with Propeller Tool".
    It opened and then I saved it by clicking on "file" "save to" "propeller library".

    Hope this helps.
  • It's already in my Download folder so I'll try the rest. thanks
  • A question about the pic or two or more. 1;can either pic act as a slave on I2C? 2; what would I need to program the pic and where do I get the pbasic compiler( from Parallax downloads maybe?). 3; Can I use thePic 16F1938.
Sign In or Register to comment.