Thread: [Flashforth-devel] FF tutorial and guide
Brought to you by:
oh2aun
From: Peter J. <pe...@me...> - 2012-10-08 04:37:35
|
Hi All, Over the past few months, I have been putting together a couple of documents to help engineering students get started with Flash Forth. The first is a tutorial guide that works through a few simple exercises. http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/ff-tutorial-guide.pdf The second is a companion reference document (Hitchhikers' Guide to FF) that tries to pack a more complete overview into a few pages. http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/flash-forth-sheet.pdf These documents are a work in progress and, although I have been tinkering with microcontrollers for a few years, I am a beginner with FF. I know that there are some (hopefully small) things that need fixing but I think that the documents are ready for use/review. Comments and corrections are most welcome. Regards, Peter Jacobs Mechanical Engineering, University of Queensland. |
From: Mikael N. <mik...@pp...> - 2012-10-08 05:54:07
|
Thanks a lot Peter ! Really nice work, and long overdue for FF. I'll check them out, and comment. Cheers /Mike On 8.10.2012 7:37, Peter Jacobs wrote: > Hi All, > Over the past few months, I have been putting together a couple of > documents to help engineering students get started with Flash Forth. > The first is a tutorial guide that works through a few simple exercises. > > http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/ff-tutorial-guide.pdf > > The second is a companion reference document (Hitchhikers' Guide to > FF) that tries to pack a more complete overview into a few pages. > > http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/flash-forth-sheet.pdf > > These documents are a work in progress and, although I have been > tinkering with microcontrollers for a few years, I am a beginner with > FF. I know that there are some (hopefully small) things that need fixing > but I think that the documents are ready for use/review. Comments > and corrections are most welcome. > > Regards, > Peter Jacobs > Mechanical Engineering, University of Queensland. > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Mikael N. <mik...@pp...> - 2012-10-08 20:02:43
|
Hi Peter, Firstly, I want to say what a nice tutorial it is. -- About the tutorial and flow control. In the cutecom picture you combine the USB with SW flow control. With the USB interface one must use HW flow control. The intercharacter delay is not needed. With the UART and SW flow control, no delays should be needed when you set the UART into low latency mode(linux) or remove the UART FIFOs from use(windows). Having the delay there makes the serial operation just work, but it also makes loading of files quite slow. -- About the hitchikers guide. Do not call VALUE VNAME a variable, but just call it value VNAME. Explain that TO sets a new value into the VNAME. Formatted strings are constructed before the PAD in the end of TIB. Not in PAD which has 0 as default size. If you are using the default values of the p18f-main.cfg the following is valid for the UART version. SRAM is further subdivided as: $f000 - $f03f 64-byte flash write buffer $f040 - $f05f 32-byte used internall by FF $f060 - $f06f 16-byte interrupt parameter stack $f070 - $f093 36-byte RX an TX buffers $f094 - $f09d 10-byte mirror of turnkey, dp, latest $f09e - $f09f 2-byte interrupt vector $f0a0 - $foa1 2-byte user pointer $f0a2 - $f1b1 user area for operator task $f1b2 - $ff5f free for application use (up to RAM HI) $ff60 - $ffff special function registers -- May I store copies of these documents on the FF web ? / Mike |
From: Peter J. <pe...@me...> - 2012-10-10 12:52:28
|
Mike, Pete, Thanks for the useful and very encouraging comments. I'll probably get to work on this again over the weekend when I'll dust off an old Windows machine and try out the various terminal programs that the students are likely to use. So far, I've been concentrating on just using the UART interface on the MCU and in all cases have used one of several USB-to-UART bridges that I have available. Much of the custom instrumentation that interests me is timing sensitive and I want to minimize the number of things that the MCU has to deal with. You are most welcome to put the documents on the FF web. In the next few days (hopefully), I'll clean up the issues that you've identified. Cheers, Peter J. On 09/10/12 06:02, Mikael Nordman wrote: > Hi Peter, > Firstly, I want to say what a nice tutorial it is. > -- > About the tutorial and flow control. > > In the cutecom picture you combine the USB with SW flow control. > With the USB interface one must use HW flow control. > The intercharacter delay is not needed. > > With the UART and SW flow control, no delays should be needed > when you set the UART into low latency mode(linux) > or remove the UART FIFOs from use(windows). > > Having the delay there makes the serial operation just work, but it also > makes loading of files quite slow. > > -- > About the hitchikers guide. > > Do not call VALUE VNAME a variable, but just call it value VNAME. > Explain that TO sets a new value into the VNAME. > > Formatted strings are constructed before the PAD in the end of TIB. > Not in PAD which has 0 as default size. > > If you are using the default values of the p18f-main.cfg > the following is valid for the UART version. > SRAM is further subdivided as: > $f000 - $f03f 64-byte flash write buffer > $f040 - $f05f 32-byte used internall by FF > $f060 - $f06f 16-byte interrupt parameter stack > $f070 - $f093 36-byte RX an TX buffers > $f094 - $f09d 10-byte mirror of turnkey, dp, latest > $f09e - $f09f 2-byte interrupt vector > $f0a0 - $foa1 2-byte user pointer > $f0a2 - $f1b1 user area for operator task > $f1b2 - $ff5f free for application use (up to RAM HI) > $ff60 - $ffff special function registers > > -- > May I store copies of these documents on the FF web ? > > / Mike > > |
From: Mikael N. <mik...@pp...> - 2012-10-10 17:05:14
|
Myself, I have never used an USB-UART bridge with FlashForth. I suppose one would use SW flow control with that. Maybe some extra TX delays could be needed for that, if the latency of the bridge is high. Mike On 10.10.2012 15:52, Peter Jacobs wrote: > Mike, Pete, > Thanks for the useful and very encouraging comments. > I'll probably get to work on this again over the weekend when > I'll dust off an old Windows machine and try out the various > terminal programs that the students are likely to use. > So far, I've been concentrating on just using the UART > interface on the MCU and in all cases have used one of > several USB-to-UART bridges that I have available. Much > of the custom instrumentation that interests me is timing > sensitive and I want to minimize the number of things that > the MCU has to deal with. > You are most welcome to put the documents on the FF > web. In the next few days (hopefully), I'll clean up the > issues that you've identified. > Cheers, > Peter J. > > > On 09/10/12 06:02, Mikael Nordman wrote: >> Hi Peter, >> Firstly, I want to say what a nice tutorial it is. >> -- >> About the tutorial and flow control. >> >> In the cutecom picture you combine the USB with SW flow control. >> With the USB interface one must use HW flow control. >> The intercharacter delay is not needed. >> >> With the UART and SW flow control, no delays should be needed >> when you set the UART into low latency mode(linux) >> or remove the UART FIFOs from use(windows). >> >> Having the delay there makes the serial operation just work, but it also >> makes loading of files quite slow. >> >> -- >> About the hitchikers guide. >> >> Do not call VALUE VNAME a variable, but just call it value VNAME. >> Explain that TO sets a new value into the VNAME. >> >> Formatted strings are constructed before the PAD in the end of TIB. >> Not in PAD which has 0 as default size. >> >> If you are using the default values of the p18f-main.cfg >> the following is valid for the UART version. >> SRAM is further subdivided as: >> $f000 - $f03f 64-byte flash write buffer >> $f040 - $f05f 32-byte used internall by FF >> $f060 - $f06f 16-byte interrupt parameter stack >> $f070 - $f093 36-byte RX an TX buffers >> $f094 - $f09d 10-byte mirror of turnkey, dp, latest >> $f09e - $f09f 2-byte interrupt vector >> $f0a0 - $foa1 2-byte user pointer >> $f0a2 - $f1b1 user area for operator task >> $f1b2 - $ff5f free for application use (up to RAM HI) >> $ff60 - $ffff special function registers >> >> -- >> May I store copies of these documents on the FF web ? >> >> / Mike >> >> > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Adam <ge...@in...> - 2012-10-10 20:10:51
|
Hi All, Suppose it brings nothing very important, but: - using FTDI USB to RS232 is fully transparent till now for me, some minor problems are with rs485 converters (tx/rx switching) - on 30f3011 FF works well if defined words are sent by UART as command (ascii) (& sw char used), with the same UART line (both debug/program and app) - on other doubled USART PIC (i.e.30f 6010a) is well to make the both debug and control the same time, esp with int defined, MODBUS i.e. - some trying the network version of simple FF app (using moxa eth/uart and delphi/server) as a test replace of bootloader ,with later 'J' version (eth inside) of PIC as a target, in mind to find similar to tibbo module, could be some kind of test to check it through the ocean... ;-) - if some others tried that... Other idea of the forth itself (I'm not in force/time to check it now) could be to replace the words with exact long asm code of each words used rather then 'standard' forth commands/jump - it should bring the same speed /length as asm/c definition but is memory usage trash. On PC there exist the Forth using this philosophy, also some forth implementation exists for '51 (all forth words definition are on PC, and result word is made only as long structure compiled once) regards Adam ps. some first time problems with FF was for me to find the peripherial off (PMD reg def in source) pps if there is implementation of 18f4550/2550 (USB) with FF usage, - nice to know that "Mikael Nordman" <mik...@pp...> pisze: > Myself, I have never used an USB-UART bridge with FlashForth. > I suppose one would use SW flow control with that. > Maybe some extra TX delays could be needed for that, if the latency of > the bridge is high. > > Mike > > On 10.10.2012 15:52, Peter Jacobs wrote: > > Mike, Pete, > > Thanks for the useful and very encouraging comments. > > I'll probably get to work on this again over the weekend when > > I'll dust off an old Windows machine and try out the various > > terminal programs that the students are likely to use. > > So far, I've been concentrating on just using the UART > > interface on the MCU and in all cases have used one of > > several USB-to-UART bridges that I have available. Much > > of the custom instrumentation that interests me is timing > > sensitive and I want to minimize the number of things that > > the MCU has to deal with. > > You are most welcome to put the documents on the FF > > web. In the next few days (hopefully), I'll clean up the > > issues that you've identified. > > Cheers, > > Peter J. > > > > > > On 09/10/12 06:02, Mikael Nordman wrote: > >> Hi Pete > >> Firstly, I want to say what a nice tutorial it is. > >> -- > >> About the tutorial and flow control. > >> > >> In the cutecom picture you combine the USB with SW flow control. > >> With the USB interface one must use HW flow control. > >> The intercharacter delay is not needed. > >> > >> With the UART and SW flow control, no delays should be needed > >> when you set the UART into low latency mode(linux) > >> or remove the UART FIFOs from use(windows). > >> > >> Having the delay there makes the serial operation just work, but it also > >> makes loading of files quite slow. > >> > >> -- > >> About the hitchikers guide. > >> > >> Do not call VALUE VNAME a variable, but just call it value VNAME. > >> Explain that TO sets a new value into the VNAME. > >> > >> Formatted strings are constructed before the PAD in the end of TIB. > >> Not in PAD which has 0 as default size. > >> > >> If you are using the default values of the p18f-main.cfg > >> the following is valid for the UART version. > >> SRAM is further subdivided as: > >> $f000 - $f03f 64-byte flash write buffer > >> $f040 - $f05f 32-byte used internall by FF > >> $f060 - $f06f 16-byte interrupt parameter stack > >> $f070 - $f093 36-byte RX an TX buffers > >> $f094 - $f09d 10-byte mirror of turnkey, dp, latest > >> $f09e - $f09f 2-byte interrupt vector > >> $f0a0 - $foa1 2-byte user pointer > >> $f0a2 - $f1b1 user area for operator task > >> $f1b2 - $ff5f free for application use (up to RAM HI) > >> $ff60 - $ffff special function registers > >> > >> -- > >> May I store copies of these documents on the FF web ? > >> > >> / Mike > >> > >> > > > > > > ------------------------------------------------------------------------------ > > Don't let slow site performance ruin your business. Deploy New Relic APM > > Deploy New Relic app performance management and know exactly > > what is happening inside your Ruby, Python, PHP, Java, and .NET app > > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > > http://p.sf.net/sfu/newrelic-dev2dev > > _______________________________________________ > > Flashforth-devel mailing list > > Fla...@li... > > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Peter J. <pe...@me...> - 2012-10-14 10:55:35
|
Tutorial and sheet have been updated following comments from Mike and Pete. Same dropbox links as in the original post. I gave up trying to keep the Hitchhiker's guide within 4 pages. The extra examples and the I2C words were worth adding already and I expect that the document will expand (slowly) as time goes by. Cheers, Peter J. On 08/10/12 14:37, Peter Jacobs wrote: > Hi All, > Over the past few months, I have been putting together a couple of > documents to help engineering students get started with Flash Forth. > The first is a tutorial guide that works through a few simple exercises. > > http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/ff-tutorial-guide.pdf > > The second is a companion reference document (Hitchhikers' Guide to > FF) that tries to pack a more complete overview into a few pages. > > http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/flash-forth-sheet.pdf > > These documents are a work in progress and, although I have been > tinkering with microcontrollers for a few years, I am a beginner with > FF. I know that there are some (hopefully small) things that need fixing > but I think that the documents are ready for use/review. Comments > and corrections are most welcome. > > Regards, > Peter Jacobs > Mechanical Engineering, University of Queensland. > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Mikael N. <mik...@pp...> - 2012-10-15 19:34:22
|
Thanks, I will put them up on the FF web. / Mike On 14.10.2012 13:55, Peter Jacobs wrote: > Tutorial and sheet have been updated following comments from > Mike and Pete. Same dropbox links as in the original post. > > I gave up trying to keep the Hitchhiker's guide within 4 pages. > The extra examples and the I2C words were worth adding already > and I expect that the document will expand (slowly) as time goes by. > > Cheers, > Peter J. > > On 08/10/12 14:37, Peter Jacobs wrote: >> Hi All, >> Over the past few months, I have been putting together a couple of >> documents to help engineering students get started with Flash Forth. >> The first is a tutorial guide that works through a few simple exercises. >> >> http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/ff-tutorial-guide.pdf >> >> The second is a companion reference document (Hitchhikers' Guide to >> FF) that tries to pack a more complete overview into a few pages. >> >> http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/flash-forth-sheet.pdf >> >> These documents are a work in progress and, although I have been >> tinkering with microcontrollers for a few years, I am a beginner with >> FF. I know that there are some (hopefully small) things that need fixing >> but I think that the documents are ready for use/review. Comments >> and corrections are most welcome. >> >> Regards, >> Peter Jacobs >> Mechanical Engineering, University of Queensland. >> >> >> ------------------------------------------------------------------------------ >> Don't let slow site performance ruin your business. Deploy New Relic APM >> Deploy New Relic app performance management and know exactly >> what is happening inside your Ruby, Python, PHP, Java, and .NET app >> Try New Relic at no cost today and get our sweet Data Nerd shirt too! >> http://p.sf.net/sfu/newrelic-dev2dev >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > ------------------------------------------------------------------------------ > Don't let slow site performance ruin your business. Deploy New Relic APM > Deploy New Relic app performance management and know exactly > what is happening inside your Ruby, Python, PHP, Java, and .NET app > Try New Relic at no cost today and get our sweet Data Nerd shirt too! > http://p.sf.net/sfu/newrelic-dev2dev > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Peter J. <pe...@me...> - 2013-01-08 07:25:32
|
I've updated the tutorial and reference sheet over the new year. The new versions are at the same dropbox locations, as given below. Changes: 1. Added an I2C slave example to the tutorial. 2. Small edit to remove 0> from the reference sheet. Cheers, Peter J. On 08/10/12 14:37, Peter Jacobs wrote: >> Hi All, >> Over the past few months, I have been putting together a couple of >> documents to help engineering students get started with Flash Forth. >> The first is a tutorial guide that works through a few simple exercises. >> >> http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/ff-tutorial-guide.pdf >> >> The second is a companion reference document (Hitchhikers' Guide to >> FF) that tries to pack a more complete overview into a few pages. >> >> http://dropbox.eait.uq.edu.au/e4pjacob/flash-forth/flash-forth-sheet.pdf >> >> These documents are a work in progress and, although I have been >> tinkering with microcontrollers for a few years, I am a beginner with >> FF. I know that there are some (hopefully small) things that need fixing >> but I think that the documents are ready for use/review. Comments >> and corrections are most welcome. >> >> Regards, >> Peter Jacobs >> Mechanical Engineering, University of Queensland. >> >> |