Shop OBEX P1 Docs P2 Docs Learn Events
TACHYON O/S V3.0 JUNO - Furiously Fast Forth, FAT32+LAN+VGA+RS485+OBEX ROMS+FP+LMM+++ - Page 17 — Parallax Forums

TACHYON O/S V3.0 JUNO - Furiously Fast Forth, FAT32+LAN+VGA+RS485+OBEX ROMS+FP+LMM+++

11415171920109

Comments

  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-11-27 16:24
    mindrobots wrote: »
    I'm feeling a bit silly about this question but after playing with Tachyon for a good part of the day and reading this thread and looking at the code, I'm thinking it's a bit like my wife! (It's an endearing quality, I assure you!)

    Does Tachyon ever FORGET? I can't find a way to FORGET my definitions (remove them from the dictionary in some way) without doing REBOOT. Am I missing something?

    I didn't forget to forget, I just didn't forget. Got it?

    Because of the way I create vector table entries with each new code entry I just haven't bothered to implement a word that is in my opinion unnecessary. If the code I have loaded is only sitting in RAM then I just hit a ^C or some other reset it so that I can reload again, it only takes a couple of seconds. Alternatively since Tachyon generates very compact code I just load new code over the top of the old.

    In the event that I have done a BACKUP then that's different and at present I just load all the modules back in again. Even though this process only takes a few seconds I am looking at ways to lock the modules so that I only need to load the latest module. But once again I don't feel a pressing need to implement a FORGET which proved useful when you had to load from slow floppies and memory was limited as well.
  • mindrobotsmindrobots Posts: 6,506
    edited 2012-11-27 16:32
    OK, so Tachyon's more like an Elephant that can't handle its booze. It never forgets unless you take it out and get it (re)loaded!

    I can see your point and now I won't forget it, so let's forget we had this discussion!

    Thanks!
  • MJBMJB Posts: 1,235
    edited 2012-12-08 15:41
    Hi Peter,
    is my assumtion correct, that SPIN and Tachyon can coexist if some rules are followed?
    Like:
    - place SPIN code in Tachyon.spin file before the dictionary.
    - don't stop the SPIN COG
    - from START start your own spin code instead of terminating the COG
    - load the serial PASM code into COG7 instead
    - for communication between TACHYON and SPIN additional hub 'registers' could be defined
    - SPIN code can not easily use the terminal connection since this is used by Tachyon. (haven't checkt the details of communication yet)
  • KeithEKeithE Posts: 957
    edited 2012-12-09 22:04
    I couldn't take it anymore and had to give Tachyon a spin. I've tried forth a few times and at one point played with some simple machine forth on an FPGA board when playing with computer chess development, but I never really got any good at it.

    I was wondering if WORDS is expected to work for the release Tachyon V2.1.spin that's on dropbox. The only things that I changed are the clock rate (from 10 to 5 MHz) and the baud rate.

    Here's an example of what I see:
      Propeller .:.:--TACHYON--:.:. Forth V21121114.1330
     Cold start - no user code - setting defaults
    ----------------------------------------------------------------
    WORDS
    6A65: 80 0E 03 DUP
    F9FF: C1 D9 08
    FA04: CB B4 9A
    0000: C4 7E 24 ZbnI
    0000: C4 7E 24 ZbnI
    0000: C4 7E 24 ZbnI
    

    It keeps printing out the last line over and over. I tried this on both a demo board and quickstart board and saw the same behavior.

    I'll have to go through this thread and look for tips. e.g. what's a good OS X terminal emulator to use? Is there a way to connect from an iPad or Nexus 7 tablet? After watching the Ben Heck show where he makes a portable basic computer, it's tempting to buy a large LCD (Alphasmart size) from Ebay and make a little portable forth machine for random lab work.

    Right now I'm using Windows XP under VMware on a OS X machine. I'm using Tera Term since I wasn't sure how to transfer files from Hyperterminal if we need to add delays after every line. I found that I needed to convert the line endings before Tera Term can successfully transfer the file EXTEND.fth. One I loaded that I was able to use QWORDS. There were some beeps during download that make me wonder if it was successful. Is there any way to check the integrity of the image?

    Thanks,
    Keith
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-09 23:14
    KeithE wrote: »
    I couldn't take it anymore and had to give Tachyon a spin. I've tried forth a few times and at one point played with some simple machine forth on an FPGA board when playing with computer chess development, but I never really got any good at it.

    I was wondering if WORDS is expected to work for the release Tachyon V2.1.spin that's on dropbox. The only things that I changed are the clock rate (from 10 to 5 MHz) and the baud rate.

    Thanks,
    Keith

    Hi Keith, I've neglected Tachyon lately, about time I went over and gave it a bit of a pat then. It's very unusual that your version didn't work so I'll check the dropbox files etc and get to you on this thread. I just use minicom in Linux but Putty should be good too.

    BTW, I remembered that I have a WORDS in the precompiled kernel and then I have another one with some enhancements in EXTEND.fth. I'll check them both.
  • D.PD.P Posts: 790
    edited 2012-12-09 23:21
    KeithE wrote: »
    I couldn't take it anymore and had to give Tachyon a spin. I've tried forth a few times and at one point played with some simple machine forth
    .
    .
    .

    I'll have to go through this thread and look for tips. e.g. what's a good OS X terminal emulator to use?
    .
    .
    .
    Keith

    I use minicom natively on OSX. ZTerm is another option.

    And launch it like this using an alias

    alias mini='minicom -D /dev/tty.usbserial-0000103D -b 230400' # the last argument being the baud rate. To paste the forth extensions in this terminal at this baud rate you must have a 10ms new line text delay and a 1 ms character text delay. Use (CTRL-a z ) to bring up the options in the terminal.

    And you will find your unique device serial port in /dev/tty.usb*

    Your problem is your terminal, I'm running this version of Tachyon on multiple devices under multiple OSs, even Windows7 on parallels on my Macbook Pro 10.6.8 using TeraTerm Pro.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-09 23:24
    D.P wrote: »
    I use minicom natively on OSX. ZTerm is another option.

    And launch it like this using an alias

    alias mini='minicom -D /dev/tty.usbserial-0000103D -b 230400' # the last argument being the baud rate. To paste the forth extensions in this terminal at this baud rate you must have a 10ms new line text delay and a 1 ms character text delay. Use (CTRL-a z ) to bring up the options in the terminal.

    And you will find your unique device serial port in /dev/tty.usb*

    Your problem is your terminal, I'm running this version of Tachyon on multiple devices under multiple OSs, even Windows7 on parallels on my Macbook Pro 10.6.8 using TeraTerm Pro.
    I find that I only need the 10ms line delay and no delay at all for characters. Have you tried that? It downloads very fast.
  • D.PD.P Posts: 790
    edited 2012-12-09 23:48
    I will as soon as I see TachyonFatFiles.fth file posted :) Speaking of which I wonder just what you are up to with your DE115, P2 image and Tachyon.

    I'll let this thread know about the char delay.

    EDIT

    Just retested my setup and I do infact still need the 1ms char delay.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-10 00:40
    D.P wrote: »
    I will as soon as I see TachyonFatFiles.fth file posted :) Speaking of which I wonder just what you are up to with your DE115, P2 image and Tachyon.

    I'll let this thread know about the char delay.

    EDIT

    Just retested my setup and I do infact still need the 1ms char delay.
    Well as soon as we get a few people helping with the P2 documentation then I can take a break. It's grueling man.
    As much as I'm itching to fire up Tachyon on the P2 FPGA I've just been too bogged down with all these other things. Now I have the job of judging the entries for the Forth of the Forth because I need to have that done in the next day or so. Then I've got my new QVGA display board that I will have to test and write some firmware for the interface chip as well. Then....not P2....but Tachyon will get some more attention as I have some real need at present for FAT32. All this is interleaved with work projects but Tachyon P2 will be up and running soon.
  • MJBMJB Posts: 1,235
    edited 2012-12-10 02:24
    I recently had same problem.

    Did you notice, that Tera-Term has a separate delay setting for Cut&Paste in the SETUP\Additional Settings\Cut&Paste tab?
    KeithE wrote: »
    I couldn't take it anymore and had to give Tachyon a spin.

    Thanks,
    Keith
  • KeithEKeithE Posts: 957
    edited 2012-12-10 08:28
    Thanks for the tips guys. I was able to load EXTEND.fth and use QWORDS with Tera Term. My main problem was the WORDS that's built into the Tachyon V2.1.spin file. It's not that I really need that to work, but it makes me worry that something fundamental may have gone wrong. I'll give some of the suggestions for other tools a try this week since I'm not crazy about running Tera Term.

    Regards,
    Keith
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-12-10 09:53
    If you don't like TeraTerm, there are other terminal programs for Window. Minicom is what I am using and I think Peter is too. Then there is PuTTY. All are free.

    I am not sure if the 'separate cut & paste' will go away as I think I have a similar situation in Minicom. I have to use the mouse and the menu of the terminal to paste, the CNTL-V doesn't work for me in Ubuntu. Not exactly sure that TeraTerm is doing with delays and tabs and all.
  • Dave HeinDave Hein Posts: 6,347
    edited 2012-12-10 10:06
    Well as soon as we get a few people helping with the P2 documentation then I can take a break. It's grueling man.
    As much as I'm itching to fire up Tachyon on the P2 FPGA I've just been too bogged down with all these other things. Now I have the job of judging the entries for the Forth of the Forth because I need to have that done in the next day or so. Then I've got my new QVGA display board that I will have to test and write some firmware for the interface chip as well. Then....not P2....but Tachyon will get some more attention as I have some real need at present for FAT32. All this is interleaved with work projects but Tachyon P2 will be up and running soon.
    Peter, I don't know how far along you are on the FAT32 implementation, but I've done some work recently on this for pfth. I'm using code from FSRW to provide the SPI driver plus the Spin mount routine. This handles the messy initialization of the SD card before I start up the Forth cog. The Spin mount routine saves the useful volume information in a data struct that can be access by the Forth routines. It saves things like the cluster size, file system type and the first sector number for the root directory. I haven't gotten very far with this yet, but I wrote a couple of words named file-list and file-type that can list the files in the root directory and type the contents of a file to the console. This code is in the latest update to pfth.
  • KeithEKeithE Posts: 957
    edited 2012-12-10 11:59
    If you don't like TeraTerm, there are other terminal programs for Window. Minicom is what I am using and I think Peter is too. Then there is PuTTY. All are free.

    I am not sure if the 'separate cut & paste' will go away as I think I have a similar situation in Minicom. I have to use the mouse and the menu of the terminal to paste, the CNTL-V doesn't work for me in Ubuntu. Not exactly sure that TeraTerm is doing with delays and tabs and all.

    Thanks - it's more for convenience than taste. I have an old minimalistic OS X laptop that I plan to use for some of this over a winter shutdown, so I wanted to make sure something would work there. I tried zterm and it worked out o.k. My main desktop has more memory etcetera, so I can run VMWare on it quite nicely.
  • KeithEKeithE Posts: 957
    edited 2012-12-11 08:22
    I have a question about one of the examples in the "Introduction to TACHYON Forth" document. In the section "Play Time" is FONT just the address of where the font is in ROM? This word doesn't seem to be defined in the core or EXTEND.fth.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-11 08:27
    KeithE wrote: »
    I have a question about one of the examples in the "Introduction to TACHYON Forth" document. In the section "Play Time" is FONT just the address of where the font is in ROM? This word doesn't seem to be defined in the core or EXTEND.fth.
    I need to go back through the intro page and bring it up to date as a lot of things changed in a very short period of time. Initially I had the VGA and fonts loaded by default but now you need to explicitly load these in yourself. Is there something in particular you need it for? It can be found in the Dropbox files as FONT5X7.fth.
  • KeithEKeithE Posts: 957
    edited 2012-12-11 08:38
    I need to go back through the intro page and bring it up to date as a lot of things changed in a very short period of time. Initially I had the VGA and fonts loaded by default but now you need to explicitly load these in yourself. Is there something in particular you need it for? It can be found in the Dropbox files as FONT5X7.fth.

    Peter - no reason, just going through the introduction. I looked at FONT5X7.fth, but it didn't look like an exact match. I'm thinking that I might start going through the manual for the Propeller Education Kit and just try translating the examples into forth. It's been a while since I played with the Propeller and with forth so I'm very rusty.

    Maybe in a year someone in this area could take Tachyon to Forth day at SVFIG. If you keep having your contests there could be some interesting demos to show.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-11 08:41
    KeithE wrote: »
    Peter - no reason, just going through the introduction. I looked at FONT5X7.fth, but it didn't look like an exact match. I'm thinking that I might start going through the manual for the Propeller Education Kit and just try translating the examples into forth. It's been a while since I played with the Propeller and with forth so I'm very rusty.

    Maybe in a year someone in this area could take Tachyon to Forth day at SVFIG. If you keep having your contests there could be some interesting demos to show.
    It's the same font but it's called FONT5X7 in Forth rather than just FONT, that's all. Come to think of it there are some characters that were never finished off in that font, mainly the lower case ones as these were just copied from the upper case and only a few were changed at the time.
  • IamretiredIamretired Posts: 56
    edited 2012-12-12 11:13
    I have a Prop Demo Board, a PS/2 keyboard, and a VGA monitor. Is there a set of instructions for setting up and using Trachyon with this configuration. Please note: I am a raw beginner.
    John
  • D.PD.P Posts: 790
    edited 2012-12-12 13:19
    Iamretired wrote: »
    I have a Prop Demo Board, a PS/2 keyboard, and a VGA monitor. Is there a set of instructions for setting up and using Trachyon with this configuration. Please note: I am a raw beginner.
    John

    How raw? Have you programmed the demo board with any spin code with the propeller tool and made the "lights" blink yet?

    What OS are you using for development work: OSX, Linux, Windows.

    dp
  • IamretiredIamretired Posts: 56
    edited 2012-12-12 17:01
    I have run the Propeller Tool on my Dell XP PC. I downloaded the TV demo onto the Prop Demo Board and ran it. I find it difficult when there are several objects that are needed to run an application like Tachyon. Years ago I learned how to write simple FORTH routines on a DOS based PC.
    Thank you,
    John
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-12 17:19
    Iamretired wrote: »
    I have run the Propeller Tool on my Dell XP PC. I downloaded the TV demo onto the Prop Demo Board and ran it. I find it difficult when there are several objects that are needed to run an application like Tachyon. Years ago I learned how to write simple FORTH routines on a DOS based PC.
    Thank you,
    John
    Hi John, are you trying to run a TV object with Tachyon? Tachyon doesn't "need" objects but a user might need the capability of an object, if you know what I mean. All the objects in the obex were written for interfacing to other Spin programs so they might need a little tweaking as no Spin independent API has been implemented for these objects. So, are you wondering how to integrate a TV object with Tachyon then?
  • D.PD.P Posts: 790
    edited 2012-12-12 18:39
    Hi John, are you trying to run a TV object with Tachyon? Tachyon doesn't "need" objects but a user might need the capability of an object, if you know what I mean. All the objects in the obex were written for interfacing to other Spin programs so they might need a little tweaking as no Spin independent API has been implemented for these objects. So, are you wondering how to integrate a TV object with Tachyon then?

    Or how about any object with tachyon, like the wiznet 5200 driver?
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-12 19:11
    D.P wrote: »
    Or how about any object with tachyon, like the wiznet 5200 driver?
    The VGA driver was easy to interface and I just ignored the Spin routines although they were using up memory. All that is really needed is to access the memory directly from Forth. The TV driver is similar and I will just have to test it out. As for the Wiznet driver I suspect that a lot of routines are written in Spin with the low-level stuff in a PASM cog. What's needed here is just the PASM for the cog and replacing the Spin commands etc with Forth ones. Do you have a link to "the wiznet 5200 driver"?
  • D.PD.P Posts: 790
    edited 2012-12-13 01:18
    The VGA driver was easy to interface and I just ignored the Spin routines although they were using up memory. All that is really needed is to access the memory directly from Forth. The TV driver is similar and I will just have to test it out. As for the Wiznet driver I suspect that a lot of routines are written in Spin with the low-level stuff in a PASM cog. What's needed here is just the PASM for the cog and replacing the Spin commands etc with Forth ones. Do you have a link to "the wiznet 5200 driver"?

    Here's the link to the repository,

    http://code.google.com/p/propeller-w5200-driver/source/browse/trunk/#trunk%2F%20propeller-w5200-driver

    This link TWC has found a buffer overflow in the driver but I've been using it without error so far.

    http://forums.parallax.com/showthread.php?144480-W5200-Possible-Gotcha-amp-Fix
  • KeithEKeithE Posts: 957
    edited 2012-12-13 23:06
    Peter - I was wondering if the ^D Debug dump "Dumps the stacks and registers and compilation area." is working in the latest version. I can't seem to make sense of the data stack dump. It the information encoded? I like a lot of the ideas that you have in here.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-13 23:25
    KeithE wrote: »
    Peter - I was wondering if the ^D Debug dump "Dumps the stacks and registers and compilation area." is working in the latest version. I can't seem to make sense of the data stack dump. It the information encoded? I like a lot of the ideas that you have in here.

    Well I just tried this and it seems to be a bug for sure, I just haven't used this feature for a while, I guess it shows. I will fix up the bug and post back here when I'm done.
    [FONT=courier new]DATA STACK 
    5685: 5C7C0003 A0BF3394 08BF3799 
    5688: 5C7C0084 A0BF37F2 5C7C000F A0BFE9A6 
    568C: 5C7C000B 6CBFE99C 5C7C00F8 68BFE9A6 
    5690: 5C7C0092 
    RETURN STACK 
    000C: 5C7C00F8 EC7F4CF8 A0BF37A6 5CFF0374 
    0010: 5C7C00F8 A0BF37A7 5C7C000F A0BF37A8 
    0014: 5C7C000F A0BF37A9 5C7C000F A0BF37A7 
    0018: A0BF4FA6 A0BF4D9B 5C7C00F8 A0BF37A8 
    001C: A0BF51A7 5C7C0018 
    LOOP STACK 
    001E: A0BF4FA6 5C7C000B 
    0020: 80BF4FA6 5C7C000B 84BF4FA6 5C7C000B 
    0024: 80FF4C01 5C7C00F8 
    REGISTERS
    0068: 00 00 26 00 00 00 00 00 00 00 00 00 00 00 00 00    ..&.............
    0078: 8D CE 13 43 00 00 00 00 8A 20 00 00 00 A0 00 00    ...C..... ......
    0088: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0098: 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 00    ................
    00A8: 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00    ................
    00B8: 00 00 01 00 00 00 00 00 00 00 01 00 00 00 00 00    ................
    00C8: 24 20 01 00 00 00 00 00 0D 00 00 00 00 00 00 00    $ ..............
    00D8: 02 00 00 00 00 00 00 00 90 7C 00 02 FD 26 00 00    .........|...&..
    00E8: 00 00 00 00 65 6A 77 5E 86 5C 91 5C 7B 35 7A 39    ....ejw^.\.\{5z9
    00F8: 7A 39 5A A5 00 00 D3 00 20 04 10 10 04 0D 00 00    z9Z..... .......
    0108: 0A 01 24 44 00 00 00 00 00 00 00 00 00 00 00 00    ..$D............
    0118: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0128: 00 00 00 00 00 30 30 30 31 30 00 00 00 23 00 00    .....00010...#..
    0138: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0148: 00 00 00 00 00 00 00 00 00 00 00 00 00 32 31 31    .............211
    0158: 31 30 34 36 34 00 00 00 00 00 00 00 00 00 00 00    10464...........
    
    COMPILATION AREA
    397A: 03 03 03 03 00 00 00 00 00 00 00 00 00 00 00 00    ................
    398A: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    399A: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    39AA: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    [/FONT]
    
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2012-12-13 23:31
    @Iamretired
    For starters, you can just use Minicom as a computer terminal in your existing computer. If you need to hook up an independent VGA and keyboard right away, you will have less Cogs to use.

    I use a Toshiba NB250 notebook and either a Prop Demo Board or Prop Proto Board ( I have about 4 boards running Forth at this point).

    I am sure Peter will explain what a VGA and keyboard require in detail.
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-14 00:37
    I fixed the bug with DEBUG, funny that. The problem lay in a simple word which is used to point to the stacks in the cog and it had been moved to interpreted bytecode to free up a couple of longs. In fact there were two bugs with it, one in the definition and the other in the vector table entry. All fixed.
    [FONT=courier new]DATA STACK 
    01A6: 000001A6 00001234 
    01A8: FFFFF9FF 00000000 00000000 00000000 
    01AC: 00000000 00000000 00000000 00000000 
    01B0: 00000000 00000000 
    RETURN STACK 
    01B2: 0000167A 00001487 
    01B4: 000013E8 00000A93 00000A77 00000A10 
    01B8: 000009A6 000009A6 0000099E 00000996 
    01BC: 00000000 00000000 00000000 00000000 
    01C0: 00000000 00000000 00000000 00000000 
    LOOP STACK 
    01C4: 00000000 00000000 00000000 00000000 
    01C8: 00000000 00000000 00000000 00000000 
    REGISTERS
    0068: 00 00 CC 01 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0078: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0088: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0098: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    00A8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    00B8: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    00C8: 00 00 00 00 00 00 00 00 34 12 00 00 00 00 00 00    ........4.......
    00D8: 04 00 00 00 00 00 00 00 90 7C 00 02 00 00 00 00    .........|......
    00E8: 00 00 00 00 65 6A 64 6A 64 6A 00 00 40 18 40 18    ....ejdjdj..@.@.
    00F8: 40 18 5A A5 01 00 00 00 20 04 10 10 04 0D 00 00    @.Z..... .......
    0108: 00 01 31 34 00 00 00 00 00 00 00 00 00 00 00 00    ..14............
    0118: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0128: 00 00 00 00 00 00 00 00 00 00 00 00 00 24 00 00    .............$..
    0138: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    0148: 00 00 00 00 00 00 00 00 00 00 00 00 00 32 31 31    .............211
    0158: 32 31 31 39 43 00 00 00 00 00 00 00 00 00 00 00    2119C...........
    
    COMPILATION AREA
    1840: 73 12 34 03 03 03 00 00 00 00 00 00 00 00 00 00    s.4.............
    1850: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    1860: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    1870: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00    ................
    
    [/FONT]
    
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2012-12-14 05:00
    Quite some time ago on this forum I started a thread about using small and cheap micros in place of more expensive and limited peripheral chips such as MCP3208s etc. For around one or two dollars or so you can have a better 12-bit ADC chip with lots of features and even program in your own acquisition code to filter and average etc if you like. Normally I interface via the I2C lines and there is no reason why the PPC can't also drive some LEDs and monitor your serial receive line for special control sequences etc. Most of these chips have ADC, DAC, PWM, UART, SPI, I2C plus they are fast and have a very good precision oscillator.

    At that time I also released some Spin code that could program the PPC with an embedded binary file compiled from whatever 8051 software tools you so desired. C8051s are very fast at 25 or 50 MIPS yet are simple to write code for even in assembler. Now I have released working Flash programming code in Tachyon Forth which takes up less than 900 bytes of code including the Intel Hex loader utility. So you can design boards with these chips instead of the limited and "why are they so much more expensive" dumb peripheral chips. The con with this chip is that except for a couple of DIP packs most of the series are only available in SMD (mostly QFN but not all).

    The reason I wrote this code in Tachyon Forth is because I designed my new QVGA TFT driver using a $1.60 chip that enables me to talk to the display via a hybrid I2C that can shift into high speed 2-wire SPI mode. The chip also takes care of power-up reset as well as block operations such as clearing the screen and fills etc. Well, it can even do everything anyway if it has to but there are some things I like to leave for the Propeller to handle. This is the block diagram for this particular one that is in an easy to solder by hand 24 pin QSOP pack. BTW, it may even handle the touch screen too.

    C8051F986.png


    The link to the code is at the bottom of the introduction page (see my sig) or also here for your convenience.

    I also had to get this display working because it's one of the prizes in the Forth of the Forth competition for which I will announce the winners this weekend.
    602 x 530 - 80K
Sign In or Register to comment.