Shop OBEX P1 Docs P2 Docs Learn Events
TAQOZ - Tachyon Forth for the P2 BOOT ROM - Page 33 — Parallax Forums

TAQOZ - Tachyon Forth for the P2 BOOT ROM

1303133353638

Comments

  • ErNaErNa Posts: 1,752
    no! no distraction! no, no, no! Not in those times ;-)
  • Hello @"Peter Jakacki" ,

    first of all many thanks for your work on TAQOZ - taking profit of the current forced 'holydays' I finally had time to dig into Forth and to carry on a project of mine waiting for five or six years now.
    Playing with the P2Eval is really joyful, waiting for your P2D2 to be shipped to ErNa. The project reads 4x serials, logs all the data to a uSD, make some calculations and spits out numbers via serial through radio and BT. Next step is to add more sensors via I2C and as soon as I have the P2D2 to take profit of the RTC as well. And, of course, a display is likely to be added, too :)

    I had been trapped in a nasty 'bug' due to the fact TaqOz is using a shared register amongst COGs for the SWITCH statement. It happened that one COG was changing the SWITCH value and therefore they went havoc, sometime one, sometime the other - not something immediate for me to trace! It took a while to discover it out, and when I realized what was happening I finally dug into your code. In order to avoid the trap, I finally changed TaqOz source code as follows:
    Original:
    *** declaration
    uswitch         res 4           ' target parameter used in CASE structures
    *** hubexec code
    ' SWITCH ( val -- )
    _SWITCH word    rg+uswitch,STOREX+ex
    
    ' SWITCH@ ( -- val )
    SWFETCH word    rg+uswitch,FETCHX+ex
    
    Patched:
    *** declaration
    cswitch     long    0   
    *** COG code
    _SWITCH     mov     cswitch,a
                jmp     #DROP
                
    SWFETCH     mov     X, cswitch
                jmp     #PUSHX
    

    This is of course a quick'n dirty one, but I think it's good to point it out so to avoid others to fall into the same trap. If you have better solutions, they will of course be very welcome. And thank you again for letting me into Forth - that's really something absolutely powerful to be used with micros!!!
  • FYI I am compiling TaqOZ from source with FlexGui on Windows after some mods to labels and the like. BTW, I also modified the TaqOZ I2C driver to support clock stretching since I had a device that needed that.
    ORIGINAL:
    I2C.CLOCK	waitx	i2cdly
    		drvh	sclpin
    		waitx	i2cdly
    		testp	sdapin wc
    		waitx	i2cdly
    		drvl	sclpin
    	_ret_	waitx	i2cdly
    
    MODIFIED
    I2C_CLOCK	waitx	i2cdly
    		flth	sclpin
    	        waitx	i2cdly
    .strtch         testp   sclpin wc
            if_nc   jmp     #.strtch
    		testp	sdapin wc
    		waitx	i2cdly
    		drvl	sclpin
    	_ret_	waitx	i2cdly
    
    I don't know if that's entirely correct, but works for me. The label cannot contain dot(s) because it is not accepted by flexgui due to SPIN2 specs.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-05-08 06:04
    jurop wrote: »
    Hello @"Peter Jakacki" ,

    first of all many thanks for your work on TAQOZ - taking profit of the current forced 'holydays' I finally had time to dig into Forth and to carry on a project of mine waiting for five or six years now.
    Playing with the P2Eval is really joyful, waiting for your P2D2 to be shipped to ErNa. The project reads 4x serials, logs all the data to a uSD, make some calculations and spits out numbers via serial through radio and BT. Next step is to add more sensors via I2C and as soon as I have the P2D2 to take profit of the RTC as well. And, of course, a display is likely to be added, too :)

    I had been trapped in a nasty 'bug' due to the fact TaqOz is using a shared register amongst COGs for the SWITCH statement. It happened that one COG was changing the SWITCH value and therefore they went havoc, sometime one, sometime the other - not something immediate for me to trace! It took a while to discover it out, and when I realized what was happening I finally dug into your code. In order to avoid the trap, I finally changed TaqOz source code as follows:
    Original:
    *** declaration
    uswitch         res 4           ' target parameter used in CASE structures
    *** hubexec code
    ' SWITCH ( val -- )
    _SWITCH word    rg+uswitch,STOREX+ex
    
    ' SWITCH@ ( -- val )
    SWFETCH word    rg+uswitch,FETCHX+ex
    
    Patched:
    *** declaration
    cswitch     long    0   
    *** COG code
    _SWITCH     mov     cswitch,a
                jmp     #DROP
                
    SWFETCH     mov     X, cswitch
                jmp     #PUSHX
    

    This is of course a quick'n dirty one, but I think it's good to point it out so to avoid others to fall into the same trap. If you have better solutions, they will of course be very welcome. And thank you again for letting me into Forth - that's really something absolutely powerful to be used with micros!!!

    I haven't had a good look at your post but since rg+switch is actually a cog dependent hub register, it depends upon whether a cog has setup it's own register area in hub. The default is at $200 but $300 is free and you could probably put another set at $380 since it is only the console task that needs more room. Otherwise just allocate some data memory and then assign it like this in the cog's startup code.
    128 bytes myregs
    
    pub SETUP_COG
    $200 myregs 128 CMOVE --- maybe make a copy of the main cog's current calues.
    myregs 1 COG! --- setup this cog to use myregs for local registers
    
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-05-08 06:06
    TAQOZ 2v5 as it currently is with everything including the kitchen sink loaded onto this binary. If you run RECLAIM you can reclaim around 4k from the dictionary although anything in EXTEND has already been reclaimed but 4k is neither here nor there at present.

    btw, I have had a chance to compare TAQOZ to Mecrisp Forth on the ARM and while Matthias has done a wonderful job (and kudos to the guy) of maintaining this on all the different platforms, and there are a lot, I find that there are so many features built into TAQOZ that I've been spoilt. Even just being able to send or paste source code at high speed without any kind of delays is a luxury I now appreciate even more. On my little ARM chip I have to paste code with 1ms character delays and 100ms line delays and it is painfully slow and it is hard to see errors. Yes, I will write buffered interrupt drivers for it but you have to decide if it is "compiletoflash" worthy beforehand whereas TAQOZ just loads to RAM (See, no Flash, no problems). Besides, TAQOZ is really compact without any problems with speed, especially on the P2.

    TAQOZ can now have code that exceeds the 64k 16-bit address limit and the memory map has been remangled to suit so that there is no adjustment needed when the first 64k "page" is full. I just need help filling it now.

    Console boot report:
    KERNEL            Parallax P2  *TAQOZ* Extensible Firmware  V2.5 'CHIP' 300MHz 200504-1430
    MODULES:
      *SPLAT*       SPLAT - Serial Propeller Logic Analyzer Terminal  200417-0000 
      *SIM*         A SIMULATOR FOR THE 65C02 - 200217.0000 
      *PLEXLED*     CharliePlexing LED device driver 190714.0000
      *PS2*         PS/2 KEYBOARD 
      *MORSE*       Morse code keyer 200126-0000 
      *CLKGEN*      Si5351 Clock generator 190800-0000
      *C2*          C2 Debug Interface for Silabs Microcontrollers - 200424.0000 
      *EASYNET*     WIZnet NETWORK SERVERS 160707.1500 
      *W5500*       WIZNET W5500 driver for TAQOZ V1.0 191007 
      *LIFE*        Conway's Game of Life for TAQOZ in the P2 ROM V1.0 190226.0000 
      *MANDELBROT*  MANDELBROT VGA DEMO 190800-0000 
      *TEXT*        VGA BMP TEXT 190800-0000
      *BMV*         BMV VIDEO PLAYER 190800-0000
      *WAVE*        WAVE AUDIO FILE PLAYER 190800-0000
      *BMP*         BMP FILE VIEWER 190800-0000
      *TIM*         TAQOZ INTERACTIVE MEDIA - AUDIO, TEXT, IMAGE & VIDEO DRIVERS 200403-1200 
      *TIA*         TAQOZ INTERACTIVE ASSEMBLER for the PARALLAX P2 - 200327-2300
      *SPIRAM*      LY68L6400 8MB SPI RAM ACCESS 191020-0000
      *DECOMPILER*  A decompiler for TAQOZ 190825-0000
      *RTC*         RV-3028 RTC DATE and TIME 190800-0000
      *DISK*        SD DISK REPORTING & FORMATTING TOOLS 190800-0000
      *EASYFILE*    SD CARD and FAT32 with VIRTUAL MEMORY  190800-0000
      *SMARTPINS*   SMARTPIN FUNCTIONS and drive modes 190800-0000
      *P2CLOCK*     P2 CLOCK CONTROL 190800-0000
      *ANSI*        ANSI TERMINAL SUPPORT 200410-0000
      *EXTEND*      Primary kernel extensions 200426-1000
      *SPIFLASH*
    MEMORY MAP
      CODE:         0D87A  55,418 bytes
      WORDS:        1AFCC  20,366 bytes
      DATA:         7E26D  621 bytes
      ROOM:                55,122 bytes
    HARDWARE
      PCB           P2      (P2D2)
      CLOCK IN      20MHZ
    DEVICES
      SD CARD       63 GB  SANDISK   SD SC64G REV$80 #35190404 DATE:2018 /10
      SPI FLASH     16MB WINBOND $EF40_1800 #4837448895114529879
    I2C DEVICES
      $A4           RV-3028 RTC
      $C4           Si5351A CLOCK GEN
                    2020/05/08 FRI 15:47:47
    -------------------------------------------------------------------------------
    TAQOZ#
    


  • kubakuba Posts: 94
    edited 2020-06-23 18:36
    Is there a way to extend the built-in Forth to the "full" V2 using the serial terminal without the SD card? That is, is there a file that could be dumped into the terminal to extend TAQOZ from 1.1 to 2.0, without booting from SD?

    If this was mentioned somewhere - I apologize. I vaguely recall I may have read about such an online update. But a problem I have is that the "documentation" is spread far and thin and it's almost impossible to find anything the 2nd time. There's stuff on forums, Dropbox, SourceForge, and Google docs... Can't it be all put into a GitHub project? Their UX is much better than the ad-laden sad pile of excrement SourceForge has (sadly) become...

    It is my understanding that you've moved your authoritative location to SourceForge. In that case may I suggesting removing Dropbox files and putting a short readme in the root folder just pointing people to SF? It is extremely confusing as it is (unless I mixed some obvious blurb on Dropbox).

    Another problem I see is that the development is not done using any version control, SF is basically used as a file repository with a UI worse than DropBox.
  • You can use the python loader that is packaged with the zip file to load the file serially.
    python3 loadp2.py _BOOT_P2.BIX
    
    I haven't checked this with other loaders but this works and is the method I use.

    Dropbox is convenient for me and I share the whole kit n caboodle so while it is a bit of a mess, it's also a treasure trove. The SourceForge pages are just the files that are necessary so that there is no confusion, plus the wiki pages etc. This suits me and while it is an extra workload, I'm happy to do it. Any extra is an extra on top of the mountain that I already have.

    Bob Edward's documentation is coming along nicely and along with material that others have submitted both for Tachyon and TAQOZ has helped and no doubt we can release an early version soon. This doc mainly focuses on TAQOZ ROM since it is fixed and simple.
  • bob_g4bbybob_g4bby Posts: 440
    edited 2020-07-02 07:42
    Just to say more - I'm the Bob Edwards mentioned, retired EE in the UK. I'd like to use P2 / TAQOZ for ham radio - I currently build PIC / Flashforth things, I don't have any P2 hardware yet - recently bought P1s, but not used yet.

    As a way of learning, I suggested to Peter I write a beginner's introduction. He very kindly set up a Google Docs entry for it and has contributed quite a lot too. It's 37 pages, very basic stuff aimed to pull in the curious and promote TAQOZ professionally. It's not original - just material from the www + Peter's help (thank you).

    For the same reason, I'm compiling a glossary of TAQOZ ROM words to print out on as few pages as possible and keep by the terminal. That's about 1/3rd complete helped by the Tachyon glossary, Peter's TAQOZ ROM web site and the ROM listing. There's a few new words that aren't obvious, but that's OK.

    Any other past or potential Tachyon 'technical authors' out there?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-07-02 08:41
    You've done well Bob. There's a certain amount of oomph required to start and then to keep it rolling to completion, and you have certainly done that mate.

    I've been motivated to chip in with my bit and at the moment I just need to finish off some missing sections, and some of the formatting. It's setup in landscape format so it is easy to view online but also paginated with a view to printing and allowing for what I think would make a great top spiral bind. Come to think of it, I must allow for that at the top of odd pages and at the bottom of even pages to allow for double-sided printing. I checked online with Officeworks here and they would print and bind that with a heavy cover page for just a few dollars. However I'd be inclined to reduce the print scale to booklet size and increase the gsm etc.

    I will try and finish up this weekend in-between hardware testing and pcbs and check with Bob because it's one of those things that you want to get right before you release it.

    This book was originally entitled along the lines of " The Hitchhikers Guide...." but we changed that to "The Bit Bashers Guide to the Parallax P2 ~ Using TAQOZ ROM Forth" to reflect the hardware etc.

    Please feel free to contribute material which if you do it in Google docs you can treat it as a work-in-progress and we can co-edit before incorporating in new documents.Don't be afraid to contribute actual content or feedback on content is helpful too. I think I have a million emails from comments advising me to add a space or a tab here and there. Content and wording first and then formatting is important for actual printing later. The glossary though will be a big one because each word should be checked and it would be good to have a usage example too. Then we can take material from there and produce a quick reference sheet too, much like we used to have for Spin and PASM.

    1688 x 1190 - 72K
  • MJBMJB Posts: 1,235
    bob_g4bby wrote: »
    Just to say more - I'm the Bob Edwards mentioned, retired EE in the UK. I'd like to use P2 / TAQOZ for ham radio - I currently build PIC / Flashforth things, I don't have any P2 hardware yet - recently bought P1s, but not used yet.

    As a way of learning, I suggested to Peter I write a beginner's introduction. He very kindly set up a Google Docs entry for it and has contributed quite a lot too. It's 37 pages, very basic stuff aimed to pull in the curious and promote TAQOZ professionally. It's not original - just material from the www + Peter's help (thank you).

    For the same reason, I'm compiling a glossary of TAQOZ ROM words to print out on as few pages as possible and keep by the terminal. That's about 1/3rd complete helped by the Tachyon glossary, Peter's TAQOZ ROM web site and the ROM listing. There's a few new words that aren't obvious, but that's OK.

    Any other past or potential Tachyon 'technical authors' out there?

    I started with commenting EXTEND in one of the very early Tachyon versions, when Peter had them online as Google-Docs.
    But is was a very dynamic moving target - now Tachyon 5.x looks pretty stable -
    but I guess only because Peter has a new playground with TaqOz and the P2.

    Then I got distracted and still have no P2 (waiting for the P2D2+extensions).
    Follow the two links in my signature.

    Actually there is SOOOO much in all the Tachyon and now Taqoz threads here in the forums,
    some of it outdated or a bit dusted but a lot still valid in general.
    Just needs to be dug out ... tested and updated, then nicely put in a living document.

    For a lot of things we do not even need the P2,
    P1+Tachyon or IoT5500+P8 (Peter's mini module) with SD/Ethernet/Webserver/Telnet/FTP ... all in Tachyon ...
    still have room for applicatios free ...
  • ErNaErNa Posts: 1,752
    Hi Ken, If I have all my P2D2 hardware back and tested, I'd like to do another presentation just on the hardware features and how we can use these boards. But rather than putting this down beside a firm date, I have just added another table there in the same format with a tentative but grayed out date of Aug 5th. I'd do it earlier if I can and if a slot is available, or later if I have to.

    Hi Peter, do I interpret correctly: You will ship P2D2 (and companion) early August? In this case I can take European Orders up to end of July to tell you how many boards I'll order. For own purposes I'll need 10. Anyway I will order some evaluation boards from Parallax in the meantime to brigde a gap. To whom it may concern: please PM me your needs.
  • Probably not the best thread for hardware itself, but...

    @ErNa - yes, but until I actually have the boards full assembled and working, I'm holding off accepting more orders which considering the troubles Parallax has just had with Rev C boards, and the troubles I've already had, is not unwarranted. However even though I haven't yet accepted any payment for your order, I still consider it an order that is to be allowed for and filled.

    Everyone who has ordered and prepaid will get some kind of bonus and while I feel pretty bad about it and apologize for these unexpected delays which have been due mainly to the USB chip software and assembly, I think that the final final product is so much better now. I will publish details of all the new stuff early next week and I'd like to do a zoom presentation on it in early August, even covering aspects of pcb layout and design in general.
  • bob_g4bbybob_g4bby Posts: 440
    edited 2020-08-06 18:38
    If you're new to both Propeller 2 and it's ROM resident language TAQOZ like I was, then this paper is a gentle intro. There are plenty of links at the back to take you further. The other essential item for using TAQOZ is a word glossary. All the words are there, some descriptions are not, but it's still useful as is. Feel free to contribute.
  • Thanks Bob and Peter, very helpful document!

    C.W.
  • I've put the links in a link page that's linked on SourceForge :)

    Here is the link page - I'm still adding to it too.

    Well done Bob!
  • Nice one, Peter, the 'Dawn' document is new to me and looks useful.
  • MJBMJB Posts: 1,235
    great job @bob_g4bby

  • I've put the links in a link page that's linked on SourceForge :)

    Here is the link page - I'm still adding to it too.

    Well done Bob!


    Agreed, and it looks like I will need to try to conquer Forth yet again...

    Peter, 2 questions if you have the time.

    1. I doubt I'll ever use Forth on a PC, so would it be adviseable to learn from your Google Docs, or start with Wirth again?

    2. Haven't looked at Forth since the 80's, however even then it struck me that you'd end up re-inventing the wheel as code sharing
    wasn't much of a thing back then aside from books. As the P2 enters production, seems like TAQOS might see more activity as
    a Primary OS/language. Any ideas on how code sharing might work, either on this site or on SF?


  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-08-15 09:00
    @koehler - learning Forth on a PC is only good for the basics but PCs and MCUs are cheese and chalk. On the PC you never really get to interact with the hardware but on an MCU it is the all important thing. So learn the basics if you must with a PC Forth but if you have Forth on your favorite MCU then just start with that.

    Use the Starting Forth book as a general guide and as a good read but try to use the Google docs because if you find holes in the documentation and have questions then you are the very right person to make us aware of that (sorry, I'm including you Bob in the us). Then not only will you benefit but anyone else who is using and will use the docs, so it will improve with use.

    Funny thing about code sharing, I've never really used other Forth code at all except for little exercises which I then pull apart and adapt anyway. The world talks about portability but if that was the all important thing then why would we even bother with countless CPU ISAs? We'd have the one standard ISA and that would be that. But we know that one size does not fit all. I don't think that Forth will ever be a primary language in this day and age seeing that I mentioned portability for one. Many "programmers" these days are copy&pasters and depend a lot upon having the libraries. So many times I hear someone waiting on a library for a device, when it is so easy to read the spec and bit-bash something simple to get going. Anyway, that's another long long story that I haven't got time for because I am not waiting around.

    While we could post code and snippets on the forum it would be good to have them stored separate and SF seems just as good for that, but I welcome some constructive feedback.
  • Hi Koehler,

    I'm also new to Propellers but have built small things in Flashforth over the years. The latest thing was a stepper motor driven capacitor for a magnetic loop antenna. I made sure I had the forth glossary printed out and just got coding. First, a few forth words to make the motor step N steps up or down. Then some words to divert the forth 'emit' word to print on a 2 line lcd. Then some words to read a shaft encoder and test that with a count on the lcd ... and so on until the top word which displays a 'splash' screen and then starts the whole application.

    I haven't got a P2 yet, but instead soldered together a P1 board which runs Peter's Tachyon forth well. I'm just about to add a plug-in board with an si5351 rf oscillator on it, since I'll want to use that in my ham radio projects. Like Peter says, I'll be reading the datasheet to find what registers to set via the i2c bus and interactively writing forth words until it works. Every time a new forth word tests out ok, take a copy from the terminal history and save it in a source file. The known good source then gradually grows into your complete library for that chip.

    I'm looking forward to getting a P2 because the sdcard loaded version, 'TAQOZ RELOADED' allows in-line assembly language. I want to write a complete software defined radio using this combination.

    Anyway, my advice would be to start coding in Tachyon or Taqoz straight away with a useful but simple project, so you've a real incentive to learn about it to finish the job. Peter's forths are slightly different to the PC forths, so best to get used to them straight away with no confusion from other forth dialects. Stick at it, I found it hard to understand at first, but it soon started to make sense. I used to read a bit, then try that part out on the hardware, making notes where useful.

    Between Peter's websites, the 'Bitbashers Guide', the Glossaries and the free book 'Starting Forth' it should start coming back to you pretty quickly. We can answer any questions along the way to make sure you succeed.

    Cheers for now, Bob (See my page on www.qrz.com, type in my callsign G4BBY to see some non-forth projects I've done)
  • Here's a quick couple of tips using Tachyon. Unlike a Forth where you can type in a one line "script" and have it execute interpret that line, Tachyon compiles every word you type in, even if it isn't in a definition. By the time you press enter the compiled code is ready to execute at runtime speeds, after which it releases that temporary code. Since it compiles everything, you can freely use all the "compile-time only" words, there is no distinction or restriction. So much better you think? Yeah, I don't know why all Forths don't do it that way.

    Another tip: Use shortcut keys such as ^X to reexecute the previous line, or ESC to scrub that line and start again. It's all in the documents.
  • MJBMJB Posts: 1,235
    koehler wrote: »
    ...

    Get yourself a P1 or P2 board even on breadboard load Tachyon/TaqOz onto it

    Take the Tachyon source files into an editor, also helps having the glossary and documentation open.
    And just go step by step.
    If you unsure about a word have a search into the source ... you will learn a lot.
    I even learnt PASM this way ...
  • koehlerkoehler Posts: 598
    edited 2020-08-18 03:36
    Peter and MJB, good points all around.

    Definitely should be interesting to be able to work in Taqoz and instantly be able to test something.
    Once Peter has his final boards made, I'll be getting one and jumping.

    My comment about shared code/words/glossary is when one gets to more complicated devices.
    Some of us are simply never going to be able to code to a level like getting HDMI running, etc.
    At least thats my impression from some of the coding snippets I see being discussed.
    I agree Forth probably won't see a great resurgence, however if there are basic devices defined on SF that people are using, it would seem like more Forth newbies might be able to get further along using the native Forth on the P2.


    Appreciate the suggestions, sounds like a quite reasonable way forthward.
  • MJBMJB Posts: 1,235
    @koehler
    Don.t wait for P2 just load Tachyon on P1 and start having fun with Forth
  • @MJB
    May I kindly ask your permission to quote what you wrote in the last two posts above with credits to you, of course, in some beginer tutorial I am planning to post on this forum in a relatively short time ? These are gems. Let them shine and not be buried deep in the comments.
  • MJBMJB Posts: 1,235
    Maciek wrote: »
    @MJB
    May I kindly ask your permission to quote what you wrote in the last two posts above with credits to you, of course, in some beginer tutorial I am planning to post on this forum in a relatively short time ? These are gems. Let them shine and not be buried deep in the comments.

    yes - sure.

    With the early Tachyon versions I did several attempts to capture Peter's little gems from the forum.
    I had / still have the impression that there is so much good stuff, which gets buried and lost in the thousands of random messages on the forums.
    And not having very good forum search doesn't help either.
    But Tachyon was also so much in flow that things got outdated and superceeded quite often.
    So I kind of gave up and restarted a few times.
    Great you are active here now.

    There should be a kind of Gem-Collector process to move those snippets to a temp (maybe Google)-document and from there to structured documentation.
    But clearly this is not where Peters focus is - and should be.

    I don't have a P2 yet - waiting for P2D2++
    but don't have time to do with P1+Tachyon as much as I liked.





  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-11-30 01:31
    The nice thing about screen grabs is that you get the whole picture, pixels and all, and nothing else. Here's one that I took while checking out Cluso's RetroBlade2 board. Most image viewers will blur the pixels in a bmp but I tried viewing it in a paint program (Pinta) and you can see the pixels.

    640 x 480 - 206K
  • @"Peter Jakacki" Could you post some example code for using the DACs from TAQOZ?
    Thanks in advance!

    J
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2020-11-30 02:24
    thej wrote: »
    @"Peter Jakacki" Could you post some example code for using the DACs from TAQOZ?
    Thanks in advance!

    J
    Always have a look at the sources for "examples" since they are real examples. If you have a look inside of TAQOZ.FTH you will find this little section.
    *** SMARTPIN ANALOG ***
    
    --- SMART PINS - %AAAA_BBBB_FFF_PPPPPPPPPPPPP_TT_MMMMM_0
    
    ( 12-bit analog to digital to analog, 19.5k samples/second )
    
    ---				16-bit dither DAC
    pub DAC ( bits -- )		%101_00_0_0000000_01_00011 WRFNC |< WXPIN ;
    
    --- Output a scaled voltage onto the DAC pin (5mv
    pub mV ( millivolts --- )	5 - 0 MAXS 16<< 3300 U/ WYPIN 12 DAC ;
    

    Yes, just type 10 PIN to specify a pin and then you can enter the voltage as 2750 mV for instance.

    I also use DACs for audio too so look at TIM.FTH (TAQOZ INTERACTIVE MEDIA) for some clues.




  • Awesome! Thanks :-)

    J
Sign In or Register to comment.