Thread: [Flashforth-devel] Larger PIC mcu
Brought to you by:
oh2aun
From: Tristan W. <ho...@tj...> - 2019-11-09 10:38:41
|
Hello, I am new to FlashForth and the mailing list. I have FlashForth running on both a PIC24FV16KM202 (over UART) and a PIC18F14K50 (over USB). Being able to use Forth over USB with a 20 pin DIP IC is very nice indeed. However, the PIC18F14K50 has 16kB flash and 512B ram which I am confident is not going to be sufficient for the project I have in mind. Can anyone recommend a PIC mcu with USB that has more flash + ram and that works well with FlashForth? Kind regards, Tristan |
From: Mikael N. <mik...@fl...> - 2019-11-10 06:17:41
|
Hi Tristan, I can recommend PIC24FJ128GB202 PIC24FJ64GB202 PIC18F25K50 Also older chips like PIC18F2550 works well. BR Mikael On 2019-11-09 12:23, Tristan Williams wrote: > Can anyone recommend a PIC mcu with USB > that has more flash + ram and that works well with FlashForth? |
From: Tristan W. <ho...@tj...> - 2019-11-10 21:39:07
|
Hello Mikael, Thank you. Best wishes, Tristan On 10Nov19 07:59, Mikael Nordman wrote: > Hi Tristan, > > I can recommend > PIC24FJ128GB202 > PIC24FJ64GB202 > PIC18F25K50 > > Also older chips like PIC18F2550 works well. > > BR Mikael > > On 2019-11-09 12:23, Tristan Williams wrote: > > Can anyone recommend a PIC mcu with USB > > that has more flash + ram and that works well with FlashForth? > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel > |
From: Tristan W. <ho...@tj...> - 2019-11-23 12:23:19
|
Hello, I am using a PIC18F14K50 with FlashForth 5 connecting over USB on macOS (10.11 & 10.14). I can enter Forth interactively using both Minicom and ff-shell.py. However, with my setup, neither Minicom nor ff-shell.py is able to successfully send a file of forth source. The PIC appears to be overwhelmed by a torrent of Forth. I did wonder whether the PIC was making a value judgement about quality of my code, but think it more likely that my setup has a flow control problem. Both Minicom and ff-shell.py were setup to use CRTSCTS (though changing to XON/XOFF made no difference) which I think is correct for a USB CDC serial connection. Running Minicom and ff-shell.py interactively and checking the USB CDC serial port settings with stty whilst they are running showed that neither CRTSCTS nor XON/XOFF appeared to be set. I do not know if that is normal for macOS with CDC. If anyone is using macOS and is able to send files via Minicom or ff-shell.py over USB I would appreciate any pointers as to where I am going wrong. I've written a small transfer program for my setup, so I can send Forth files and am enjoying using FlashForth greatly. However, I am new to USB/CDC and would like to know what is wrong with my setup and how to fix it (if possible!) so I can use the existing shells. All help gratefully received. Thank you! Tristan |
From: Grant O. <kg...@gr...> - 2019-11-23 15:53:52
|
I had the same problem and did this writeup: https://www.grant-olson.net/news/2019/09/04/using-minicom-with-flashforth-on-osx.html -Grant On 11/23/19 7:23 AM, Tristan Williams wrote: > Hello, > > I am using a PIC18F14K50 with FlashForth 5 connecting over USB on > macOS (10.11 & 10.14). I can enter Forth interactively using both Minicom > and ff-shell.py. However, with my setup, neither Minicom nor > ff-shell.py is able to successfully send a file of forth source. The > PIC appears to be overwhelmed by a torrent of Forth. I did wonder > whether the PIC was making a value judgement about quality of my code, > but think it more likely that my setup has a flow control > problem. Both Minicom and ff-shell.py were setup to use CRTSCTS > (though changing to XON/XOFF made no difference) which I think is > correct for a USB CDC serial connection. Running Minicom and > ff-shell.py interactively and checking the USB CDC serial port > settings with stty whilst they are running showed that neither CRTSCTS > nor XON/XOFF appeared to be set. I do not know if that is normal for > macOS with CDC. > > If anyone is using macOS and is able to send files via Minicom or > ff-shell.py over USB I would appreciate any pointers as to where I am > going wrong. > > I've written a small transfer program for my setup, so I can send > Forth files and am enjoying using FlashForth greatly. However, I am > new to USB/CDC and would like to know what is wrong with my setup and > how to fix it (if possible!) so I can use the existing shells. All > help gratefully received. > > Thank you! > > Tristan > > > > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Peter C. H. <pet...@un...> - 2019-11-23 18:55:33
|
CoolTerm (https://freeware.the-meiers.org) has the option to set character and line delays, and has worked well for us to send files. Peter > Begin forwarded message: > > From: Grant Olson <kg...@gr...> > Subject: Re: [Flashforth-devel] Sending Forth files with macOS over USB > Date: 23 November 2019 at 15:18:49 CET > To: fla...@li... > > I had the same problem and did this writeup: > > https://www.grant-olson.net/news/2019/09/04/using-minicom-with-flashforth-on-osx.html > > -Grant > > On 11/23/19 7:23 AM, Tristan Williams wrote: >> Hello, >> >> I am using a PIC18F14K50 with FlashForth 5 connecting over USB on >> macOS (10.11 & 10.14). I can enter Forth interactively using both Minicom >> and ff-shell.py. However, with my setup, neither Minicom nor >> ff-shell.py is able to successfully send a file of forth source. The >> PIC appears to be overwhelmed by a torrent of Forth. I did wonder >> whether the PIC was making a value judgement about quality of my code, >> but think it more likely that my setup has a flow control >> problem. Both Minicom and ff-shell.py were setup to use CRTSCTS >> (though changing to XON/XOFF made no difference) which I think is >> correct for a USB CDC serial connection. Running Minicom and >> ff-shell.py interactively and checking the USB CDC serial port >> settings with stty whilst they are running showed that neither CRTSCTS >> nor XON/XOFF appeared to be set. I do not know if that is normal for >> macOS with CDC. >> >> If anyone is using macOS and is able to send files via Minicom or >> ff-shell.py over USB I would appreciate any pointers as to where I am >> going wrong. >> >> I've written a small transfer program for my setup, so I can send >> Forth files and am enjoying using FlashForth greatly. However, I am >> new to USB/CDC and would like to know what is wrong with my setup and >> how to fix it (if possible!) so I can use the existing shells. All >> help gratefully received. >> >> Thank you! >> >> Tristan >> >> >> >> >> >> >> >> _______________________________________________ >> Flashforth-devel mailing list >> Fla...@li... >> https://lists.sourceforge.net/lists/listinfo/flashforth-devel > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel |
From: Mikael N. <mik...@fl...> - 2019-11-23 19:24:25
|
HI. ff-shell.py uses a line by line flow control. It waits to receive a new-line character before sending the next line. I would have thought that would work with any OS. I will add options to ff-shell.py for intercharacter delay and end-of-line delay. Possible also a character by character flow control. BR Mikael On 2019-11-23 14:23, Tristan Williams wrote: > Hello, > > I am using a PIC18F14K50 with FlashForth 5 connecting over USB on > macOS (10.11 & 10.14). I can enter Forth interactively using both > Minicom > and ff-shell.py. However, with my setup, neither Minicom nor > ff-shell.py is able to successfully send a file of forth source. The > PIC appears to be overwhelmed by a torrent of Forth. I did wonder > whether the PIC was making a value judgement about quality of my code, > but think it more likely that my setup has a flow control > problem. Both Minicom and ff-shell.py were setup to use CRTSCTS > (though changing to XON/XOFF made no difference) which I think is > correct for a USB CDC serial connection. Running Minicom and > ff-shell.py interactively and checking the USB CDC serial port > settings with stty whilst they are running showed that neither CRTSCTS > nor XON/XOFF appeared to be set. I do not know if that is normal for > macOS with CDC. > > If anyone is using macOS and is able to send files via Minicom or > ff-shell.py over USB I would appreciate any pointers as to where I am > going wrong. > > I've written a small transfer program for my setup, so I can send > Forth files and am enjoying using FlashForth greatly. However, I am > new to USB/CDC and would like to know what is wrong with my setup and > how to fix it (if possible!) so I can use the existing shells. All > help gratefully received. > > Thank you! > > Tristan > > > > > > > > _______________________________________________ > Flashforth-devel mailing list > Fla...@li... > https://lists.sourceforge.net/lists/listinfo/flashforth-devel -- -- Mikael |
From: Tristan W. <ho...@tj...> - 2019-11-23 22:14:37
|
Mikael, Grant, Peter, Thank you. I've used Minicom as my interactive comms program for years, but I was not aware of the inter-character delay option. Thank you. On 23Nov19 20:14, Mikael Nordman wrote: > HI. > > ff-shell.py uses a line by line flow control. > It waits to receive a new-line character before sending the next line. > I would have thought that would work with any OS. > I will add options to ff-shell.py for intercharacter delay and > end-of-line delay. > Possible also a character by character flow control. The transfer program I wrote takes the last approach. However, originally I was hoping that somehow, through the USB CDC driver and configuring (in someway I was not aware of) the USB CDC serial port to use CRTSCTS, some emulated flow control would be created and I could avoid the byte by byte software handshaking. My USB/CDC knowledge is too low to speculate as to whether this was wishful thinking or otherwise. Byte by byte gets the Forth to the PIC quickly enough and when it's there it is a joy to use. Best wishes and thanks, Tristan |
From: Mikael N. <mik...@fl...> - 2019-11-24 09:22:50
|
On 2019-11-24 00:14, Tristan Williams wrote: > The transfer program I wrote takes the last approach. However, > originally I was hoping that somehow, through the USB CDC driver and > configuring (in someway I was not aware of) the USB CDC serial port to > use CRTSCTS, some emulated flow control would be created and I could > avoid the byte by byte software handshaking. Tristan, On Linux/W7 I can use minicom/TeraTerm to send ascii files without any flow control at all. The USB protocol itself performs the flow control. The USB buffer on the PIC is 8 bytes max and it is owned either by the PIC or the PC. FF does not release the buffer until it has been processed completely. During the time the PIC owns the buffer the PC USB driver cannot not send anything to the PIC. If the PIC is writing to flash it does not take ownership of the buffer until the writing to flash has been completed. So when the buffer is full the PC cannot write more. So I don't really understand what is going in with OSX. I know the OSX is more picky in following the USB standard, so it could be that the my PIC USB software lacks some functionality that the OSX expects to be there. Can you check if OSX logs some errors related to USB_CDC? Mikael |