Newbie question re outputting square wave.

2»

Comments

  • Loaded up Tachyon5v7.spin. I'm using PropTool V1.3.2. At the very first #ifdef I'm getting:
    Expected "," or end of line
    

    Also more photos attached. The BOEn pin is connected to ground via a solder bridge on the underside.

    Photos attached...
    3264 x 1836 - 2M
    3264 x 1836 - 3M
  • Peter JakackiPeter Jakacki Posts: 8,923
    edited 2020-02-14 - 14:11:49
    My bad - in the last year I have been building the source from include files and compiling with bstc. Before it used to be one whole file that the Proptool could still handle. However the workaround is simple, just remove all those ifdefs and their code at the top of the file except leave the default clock like this:
    _clkmode        = xtal1 + pll8x
    _xinfreq        = 10_000_000            ' <--- AUTOMATIC 5 or 10MHz operation change at boot
    sysfreq         = 80_000_000
    
    I just checked it and it worked on PropTool

    btw, the series resistor + cap for reset might have too long a discharge since there is no real discharge path, and that might prove problematic unless you reduce the cap to a very small value, even 1,000pF, or add a light pullup on the reset line. I've gotten away with just the small cap in some designs.
  • RS_JimRS_Jim Posts: 1,319
    edited 2020-02-14 - 15:11:23
    Peter,
    Do you have bstc running in Mint 19.2 or 19.3? If so how did you get there?
    Jim
  • Loaded up Tachyon5v7.spin and deleted the lines you suggested and I still get the "Write failure COM4" after about 4 secs. I don't believe the issue is with reset because my small Test.spin loads perfectly every time.

    This is the same result using Win 8.1 on HP Pavillon laptop and Win 10 on a Lenovo Ideapad 120S.

    Was going to try it on my Linux machine but just realised Prop Tool not available.
  • Peter JakackiPeter Jakacki Posts: 8,923
    edited 2020-02-14 - 17:10:33
    You know that I program some Props without using an external reset, I simply hold the Prop in reset and then as I press F11 I release the reset. Works well. I'm only saying this because I keep thinking that your reset circuit isn't quite right. Of course it resets it on the first pulse but it has no real way of discharging the cap since Prop Tool can send more than one reset pulse. This is why you either need a very small cap or a transistor reset, or manual.

    I compile on Linux Mint 19.3 and I can use bst and bstc (Windows/Mac/Linux) as well as the Prop tool (rarely) in Wine or VirtualBox.

    Of course you could scope the rx and reset lines to see if it is behaving. It has to be your hardware.
  • I simply hold the Prop in reset and then as I press F11 I release the reset.
    Since I can't get auto-reset to reliably work on my board, I always have to do that. Except that I've found it to be much easier and more reliable to press F8 first to compile the program and then click "Load to RAM" with my mouse while I release the reset button. (PropTool's compiler is slow enough that the difference in compile time between files throws off my muscle memory when using F10/F11)
  • Loading tachyon5v7.spin, held reset low then hit F10 and released reset, same result. Something is staring us in the face and we cannot identify it! I am just 7 days with my new baby and am floundering!

    test.spin loads and runs on my two machines without fail.
    At this stage I wonder if I'd be better off with 8 arduinos hanging off the I2C bus doing all sorts of autonomous I/O stuff instead of the Prop.
  • Hmm, a forum search for the issue just brings up this thread, which isn't really helpful. Time to send an email to Parallax, I guess?
    You didn't by any chance grab a really, really old Propeller Tool version?

  • jmgjmg Posts: 14,225
    pmulvey wrote: »
    Loaded up Tachyon5v7.spin and deleted the lines you suggested and I still get the "Write failure COM4" after about 4 secs..

    As a quick HW sanity check, you could loop back the UART, and send a 100k text file (I use "U" repeating = 0x55) and check you receive all 100k characters. That should take ~8.7 seconds at 115200.


  • Peter JakackiPeter Jakacki Posts: 8,923
    edited 2020-02-14 - 22:45:16
    My worry all along has been with the power no matter what the meter says. A single glitch on the supply will reset the Prop (if you are lucky). If I saw an actual 3.3V regulator on the board, next to the Prop, suitably decoupled, then that would rule out the big one. You could feed it 5V from the USB. In fact this is probably the first thing I would have done, if I had tried to do without one in the first place that is..
  • Sent 98K of U's around the loopback using Tera Term and everything was perfect, took 11 secs. Next step is to get the 3V3 regulator and decoupling caps onboard.
  • PropTool does not work for long files, if the USB UART chip is not an FTDI. This has been reported to Parallax several times in recent years, but they don't care (they use FTDI chips).

    So try it with BST. Its the better PropTool with a preprocessor, dead code elimination, a listing and more.

    Andy

  • Andy,

    I downloaded the BST (BST.linux), not being much of a Linux head I don't know what I should do with this file. Usually its a .dmg file that the installer launches.
  • There are versions for Windows, Mac, and Linux. Which OS to you prefer?
  • Now I remember why I was on the Linux machine as I wanted to try that environment, yes of course there is a windows version so I'll try that, the brain is a bit fuzzled tracking down a solution to this issue.
  • The Linux version requires installing i386 32-bits libs for compatibility with more modern 64-bit Linux installs, although that is a simple thing to do.
    The version that seems to work on Linux is 0.19.4pre10.
  • Eureka!!!!!!!!!!!!!

    BST on Windows works, downloading perfectly.

    Tachyon bin file loaded into RAM and I have flashed my LED!

    Did some dabbling with Tachyon, I used Terminal instead of the BST Terminal as the former gives me an offline entry box that I can edit in the usual way before sending. I take it that Tachyon is geared towards a Machine-To-Machine environment.

    The next step is to get the EEPROM (ordered from AliExpress). I plan to use the P1 as an I/O board for my ESP8266 based educational board that I designed for my students. I am retired from Athlone Institute Of Technology where I taught Electronics and Computing and the college has asked me back to deliver a program for second level students as an engineering promotion exercise. We started last September and they each built the board (photo attached) and this semester we are programming it in MicroPython. If the P1 behaves itself I might incorporate it on the ESP board as the ESP is short on I/O. I currently use I2C PCF8574 for I/O and the LCD is also I2C.

    Given that I am just 7 days with the P1 and Prop Tools should I now abandon Prop Tool for BST?

    Many thanks for this international effort in getting me up and going I really appreciate it.
    3264 x 1836 - 624K
  • BST and Prop Tool are largely equivalent. Both are kinda janky and haven't been updated in a while. BST has a better compiler though.
  • jmgjmg Posts: 14,225
    Ariba wrote: »
    PropTool does not work for long files, if the USB UART chip is not an FTDI. This has been reported to Parallax several times in recent years, but they don't care (they use FTDI chips).

    Surely that is not hard to fix ?

  • Peter JakackiPeter Jakacki Posts: 8,923
    edited 2020-02-16 - 01:51:30
    I always use bst especially because it works on Linux and because it generates a proper listing (and it's better)
    My sister stayed in Athlone last year visiting her daughter. Good pubs there I believe.

    btw, I forgot to mention about using a proper ANSI terminal (not a send/receive console) and it seems you found one that works, otherwise I recommend TeraTerm for Windows and I prefer to use minicom on Linux.
  • She most certainly would have visited Sean's Bar!

    Is her daughter long living here?

    With Terminal I can set up the text commands on the macros. I will read the intro to Tachyon and play with the piano before I ask any questions!

    Thanks Peter
  • pmulvey wrote: »
    She most certainly would have visited Sean's Bar!

    Is her daughter long living here?

    With Terminal I can set up the text commands on the macros. I will read the intro to Tachyon and play with the piano before I ask any questions!

    Thanks Peter

    My niece Suzi was born here in Australia but has been living over there for the last 20 years I think. She's into archeology and acting and stuff.

    Yes, Tachyon makes a perfect language to send serial commands to and so they become the "macro" that is locked into the dictionary or you can send a one line "script", and that line can be very long too.

Sign In or Register to comment.