Prop0 Cog6 ok
RESET
If USB-device is connected, LED on CH375-board is off by H/W reset
Prop0 Cog6 ok
Set_USBmode
Detected USB device
If connected USB-device, LED on CH375-board is on.
Prop0 Cog6 ok
DiskSize
BlockPerSector:8
BytePerSector512
TotalSize:517996032
Prop0 Cog6 ok
Sal's work load has tampered off, but now he's setting up a new house. PF6 is next on his list, at last!
Caskaz had a question about indexing in assembler. Sal intends to provide an example of how to go about this correctly in propforth.
Sal is working out a proper tool set for releasing PF6. He's decided to move to GIT, and is looking for an interface tool that works on Mac, Windows, and Linux. Yes, there is the command line, but not everybody in our target audience is equipped to deal with the command line to the depth that would be requirerd. So Sal is looking for a gui for git. We were all set to go with Atlassian Source Tree, but we noticed it does not work with linux, and the other options on the list to dont work with XP. So Sal is going to do some more investigation.
PF6 itself is stable for a year, FPGA kernel "goes and goes". Only build procedure is changing. The task at hand is to determine an approproate method to distribute the automated build package using git, such that it works on the three main OS platforms, and each produces the identical result.
FPGA kernel is tiny, should go over well for long term. FPGA goal is use fewest resources, leaving as many extra resources to built virtual circuits, rather than physical circuits. And of course the identical PF6 kernel will run on the physical prop and tthe FPGA prop, the only different being the that FPGA prop will not contain the resources that are unused on the physical prop.
Next week: I should recieve a version of PF6 for GIT testing.
For now, this is just the ready to use kernels and extensions in the PropForth5.5-20130316 directory, and the build and test automation scripts and tools in the mygo directory.
There is no longer a nested zip file in the misc subdirectory.
Can the wiki pages be imported? I probably should read and edit or delete each page one by one, some are old and some were trash from start, but many probably can be brought in as is.
What about all the PDFs and docs that folks contributed? Can I put those in a Documentation directory, is that kosher?
{
3.3V
|
10kohm
|
P14 -------|
|
sw
|
GND
|\|
P15 ------| |-----220ohm---GND
|/|
LED
}
\ ===========================================================================
\ Constants
\ ===========================================================================
d14 wconstant swpin
d15 wconstant ledpin
d4000000 constant 50msec
swpin >m constant swMask
ledpin >m constant ledMask
\ ===========================================================================
\ Variables
\ ===========================================================================
wvariable swState
wvariable debounce
wvariable lastswState
variable lastDebounceTime
wvariable alternate
\ ===========================================================================
\ Main
\ ===========================================================================
\ read current sw-state
\ ( -- n1 ) n1:1[sw:off] 0[sw:on]
: rd_sw ina COG@ swMask and if 1 else 0 then ;
: init
\ Set initial values
1 swState W!
0 lastDebounceTime L!
1 lastswState W!
0 debounce W!
ledMask dira COG@ or dira COG! \ Set led to uutput
;
\ On/Off switch
\ LED on when pushed sw, LED off when released sw
\ ( -- )
: sw1
init
begin
\ Read current sw and check if pushed or released
rd_sw dup lastswState W@ <>
if
\ If sw is under debouncong
debounce W@ 0=
if
cnt COG@ lastDebounceTime L!
1 debounce W!
then
else
0 debounce W!
then
debounce W@
if
cnt COG@ lastDebounceTime L@ - 50msec >
if
\ Update current swState and lastswState
dup
swState W! lastswState W!
else
drop
then
else
drop
then
\ Activate LED when sw-on
outa COG@ ledMask
swState W@
if invert and else or then
outa COG!
fkey? swap drop
until
;
\ Alternative switch
\ Switching LED on/off when pushed sw
\ ( -- )
: sw2
init
1 alternate W!
ledMask dira COG@ or dira COG! \ Set led to uutput
begin
\ Read current sw and check if pushed or released
rd_sw dup lastswState W@ <>
if
\ If sw is under debouncong
debounce W@ 0=
if
cnt COG@ lastDebounceTime L!
1 debounce W!
then
else
0 debounce W!
then
debounce W@
if
cnt COG@ lastDebounceTime L@ - 50msec >
if
\ Treat only when pushed switch
lastswState W@
if
lastswState W! \ Update current lastswState
alternate W@ if 0 else 1 then swState W! \ Set swState
alternate W@ if 0 else 1 then alternate W! \ set alternate
else
lastswState W! \ Update current lastswState
then
else
drop
then
else
drop
then
\ Swiching LED on/off when sw-on
outa COG@ ledMask
swState W@
if invert and else or then
outa COG!
fkey? swap drop
until
;
Wrote 'DogLifeClock'code.
Not yet 'saveforth'.
Not yet HW.
Analog Clock indicate Dog's TimeStream.(It pass faster than human)
Upper line on charaLCD display current date and time.
Lower line on it display Dog'd birthday and livingdays.
I will short Dead-contact when Dog is dead.
Data is witten in eeprom.
AnalogClock stop.
CharLCD display merely Dog's birthday and Deathday and livingdays.
Well, I hope your dog is alive and well still? For a long time, I hope.. is it a Shiba? There's one just outside, she wants dinner now so I'll better see to it.
As a newcomer to propForth (but neither forth nor the propeller), can I say I'm having a whale of a time with it! Thank you, to all, for what is obviously a labour of love!
I apologise if there is a more appropriate place for a 'new boy' to ask a question, but I've spend a good few hours getting as familiar with the various sources as I can but I'm left with one bothersome problem that I can't answer. When the console handler code/cog fires up, it seems to be set to an assumed 132 col terminal mode - as seen in the output of some words, e.g. "words"! In my intended application, only an 80 col display will be connected.
So my question is this: is there some system-wide setting I have yet to find to set this, or is it simply down to my code to manage? Are the words like "words" simply built for 132 col output?
Apologies if this is a dumb, code-blind-on-a-Sunday-afternoon, question.
words is a diagnostic, and was arbitrarily set at 132 columns. My system displays 132 columns, and nobody said otherwise at the time. Also I am the primary source of feedback to the developer, so my requests tend to make it into the requirements.
FYI, we tend to use the prop embedded, and use the PC display during development. So we use teraterm (windows) or minicom (linux) and adjust columns displayed by stretching the window on the PC as needed. For narrow displays, we don't use the diagnostic, or just let it wrap. For example, I tend to use bluetooth HC05 on the serial port and use my crazy smart phone as a terminal in the field, in portrait mode I just let it wrap, in landscape I let it scroll. (I write the display for landscape so they don't scroll, mostly).
That being said:
You can redefine the definition for words to use 80 columns, or you can change the definition in the kernel.
Changing the kernel involves figuring out the build and test automation. This is a bit involved for first timers, but is being re-arranged in PropForth6 and should (might) be easier to figure out if you wait a bit longer.
Re-writing the definition for words to use 80 columns would only cost a few bytes, and would be a good exercise in familiarizing yourself with propforth.
The entire kernel is present as source code, and build automation uses the high level source to build itself. If you look in the mygo.zip archive (buried in the Propforth5.5.zip download) this has everything we use to build the kernels. The source definition for words is in there (I hope).
I am switched over to linux and am working on PF6, so I can't easily get back to windows and PF5.5; but if 80/132 columns is a show-stopper I can try to set something up if you get stuck.
+LOOP is an alternate to the do...loop construct, and like loop, can only be used inside a colon definition.
The primary construct using LOOP automatically increments the loop counter by +1, and then jumps to the "do" for another iteration.
+LOOP takes the top value from the stack, and increment the loop counter by that amount.
Compare these two examples:
: test 10 0 do i . loop ;
will print the i iterations
9 8 7 6 5 4 3 2 1 0
: test+loop 10 0 do i . 2 +loop ;
will print by 2
8 6 4 2 0
using a 3 will count by threes, etc.
I never tried changing the loop increment value on the fly, or counting by negative numbers. But now that you mention it, this could be very interesting to experiment with.
My immediate application is also embedded, but with a status display, which for legacy reasons is 80 wide. Just wanted to check if there was any fundamental aspect of serial/terminal handling that I needed to be aware of. If I know I can just completely manage it myself, no problem
The main reason for investigating propforth for this is the work you have done with multi-prop setups and making a 'virtual prop' with lots of cogs and pins which can have tasks allocated at runtime. I know this is technically mostly experimental, from a support point of view, but you've already done most of the work for me - fantastic! I'll let you know how I get on.
You mentioned v6 ... is there a timescale for this, or 'as and when'?
We're working on release now. We thought release was imminent, but work got in the way, for about the last 23 months. One new hurdle is I have to learn git and github. Git is cool, but its another personal tool written for the developer's personal convenience, and is not necessarily the best for a casual user. So I have to get to a "more than casual user" level, and make a process that anybody can follow to get the identical result as the team members. Its a fun puzzle, but it takes a little time.
I will update the PF6 thread (or maybe start a fresh one) when I get my act together.
Feel free to message with any questions you have regarding github. We (the development team) use it for the 'picochess' project (a standalone chess system, see http://www.picochess.org/).
Once you get your head around it (and there's a git joke in there) it's pretty easy and very flexible.
PF6 should be the same as PF5.5 and earlier. PF6 is only changing the build automation to include the FPGA prop(s) and add the pooled multitasker kernels to the standard DevKernel, EEpromKernel, and SDkernel.
I think that "do...loop" constructs probably terminates when the end value is less than the start value, so the loop terminates at the "do" before it even sees the -2 and the +loop. Thanks for testing this.
Comments
It's on the list of things to fix.
I got CH375 board.
http://www.amazon.com/Solu-Read-write-interface-Communication-communication/dp/B00XDLRNTY
But I don't understand how to use this yet.
Anybody can read and write files inside USB-memory?
And can read descriptor by using ch375?
Now only sertial communication is ok.
Sal's work load has tampered off, but now he's setting up a new house. PF6 is next on his list, at last!
Caskaz had a question about indexing in assembler. Sal intends to provide an example of how to go about this correctly in propforth.
Sal is working out a proper tool set for releasing PF6. He's decided to move to GIT, and is looking for an interface tool that works on Mac, Windows, and Linux. Yes, there is the command line, but not everybody in our target audience is equipped to deal with the command line to the depth that would be requirerd. So Sal is looking for a gui for git. We were all set to go with Atlassian Source Tree, but we noticed it does not work with linux, and the other options on the list to dont work with XP. So Sal is going to do some more investigation.
PF6 itself is stable for a year, FPGA kernel "goes and goes". Only build procedure is changing. The task at hand is to determine an approproate method to distribute the automated build package using git, such that it works on the three main OS platforms, and each produces the identical result.
FPGA kernel is tiny, should go over well for long term. FPGA goal is use fewest resources, leaving as many extra resources to built virtual circuits, rather than physical circuits. And of course the identical PF6 kernel will run on the physical prop and tthe FPGA prop, the only different being the that FPGA prop will not contain the resources that are unused on the physical prop.
Next week: I should recieve a version of PF6 for GIT testing.
PropForthV5.5 is now on GitHub. Please take a look and tell me if this looks right:
https://github.com/prof-braino/PropForth5.5.git
For now, this is just the ready to use kernels and extensions in the PropForth5.5-20130316 directory, and the build and test automation scripts and tools in the mygo directory.
There is no longer a nested zip file in the misc subdirectory.
Anyone have any suggestions on what to do about the wiki and downloads sections from google code? https://code.google.com/p/propforth/
Can the wiki pages be imported? I probably should read and edit or delete each page one by one, some are old and some were trash from start, but many probably can be brought in as is.
What about all the PDFs and docs that folks contributed? Can I put those in a Documentation directory, is that kosher?
Thanks
Only rotating slowly because not used H-bridge.
[video] [/video]
[video] [/video]
[video] [/video]
[video] [/video]
Not yet 'saveforth'.
Not yet HW.
Analog Clock indicate Dog's TimeStream.(It pass faster than human)
Upper line on charaLCD display current date and time.
Lower line on it display Dog'd birthday and livingdays.
I will short Dead-contact when Dog is dead.
Data is witten in eeprom.
AnalogClock stop.
CharLCD display merely Dog's birthday and Deathday and livingdays.
[video] [/video]
-Tor
Of course, she is energetic now.
Image is photo in yestaday.
She is pure Shiba.
Her father name is Tetsuhidemarugou.
Her mother name is Tamahanahimegou.
...I had never seen them.
Setting year/month/day/weekday/hour/minute/sec by RotaryEncorder.
Code also are re-written
DS1337:rtc
DS3231:rtc
ST7032i:i2c-characterLCD
PCA9546:I2C-bus-switch
PCF2129:rtc
PCF85263:rtc
As a newcomer to propForth (but neither forth nor the propeller), can I say I'm having a whale of a time with it! Thank you, to all, for what is obviously a labour of love!
I apologise if there is a more appropriate place for a 'new boy' to ask a question, but I've spend a good few hours getting as familiar with the various sources as I can but I'm left with one bothersome problem that I can't answer. When the console handler code/cog fires up, it seems to be set to an assumed 132 col terminal mode - as seen in the output of some words, e.g. "words"! In my intended application, only an 80 col display will be connected.
So my question is this: is there some system-wide setting I have yet to find to set this, or is it simply down to my code to manage? Are the words like "words" simply built for 132 col output?
Apologies if this is a dumb, code-blind-on-a-Sunday-afternoon, question.
Pablo
But not yet near and far.
This code have bugs yet.
Refer charlieplexing about 8x8Matrix below;
http://forums.parallax.com/discussion/146693/propforth-v5-5-is-available-for-download/p18
[video] [/video]
Hi Pablo2000.
I don't understand what is your problem.
What is 132 col terminal mode?
Problem about TeraTerm?
Welcome to propforth and the parallax forums!
words is a diagnostic, and was arbitrarily set at 132 columns. My system displays 132 columns, and nobody said otherwise at the time. Also I am the primary source of feedback to the developer, so my requests tend to make it into the requirements.
FYI, we tend to use the prop embedded, and use the PC display during development. So we use teraterm (windows) or minicom (linux) and adjust columns displayed by stretching the window on the PC as needed. For narrow displays, we don't use the diagnostic, or just let it wrap. For example, I tend to use bluetooth HC05 on the serial port and use my crazy smart phone as a terminal in the field, in portrait mode I just let it wrap, in landscape I let it scroll. (I write the display for landscape so they don't scroll, mostly).
That being said:
You can redefine the definition for words to use 80 columns, or you can change the definition in the kernel.
Changing the kernel involves figuring out the build and test automation. This is a bit involved for first timers, but is being re-arranged in PropForth6 and should (might) be easier to figure out if you wait a bit longer.
Re-writing the definition for words to use 80 columns would only cost a few bytes, and would be a good exercise in familiarizing yourself with propforth.
The entire kernel is present as source code, and build automation uses the high level source to build itself. If you look in the mygo.zip archive (buried in the Propforth5.5.zip download) this has everything we use to build the kernels. The source definition for words is in there (I hope).
I am switched over to linux and am working on PF6, so I can't easily get back to windows and PF5.5; but if 80/132 columns is a show-stopper I can try to set something up if you get stuck.
we had a question about +LOOP
+LOOP is an alternate to the do...loop construct, and like loop, can only be used inside a colon definition.
The primary construct using LOOP automatically increments the loop counter by +1, and then jumps to the "do" for another iteration.
+LOOP takes the top value from the stack, and increment the loop counter by that amount.
Compare these two examples:
will print the i iterations
9 8 7 6 5 4 3 2 1 0
will print by 2
8 6 4 2 0
using a 3 will count by threes, etc.
I never tried changing the loop increment value on the fly, or counting by negative numbers. But now that you mention it, this could be very interesting to experiment with.
Many thanks for the reply.
My immediate application is also embedded, but with a status display, which for legacy reasons is 80 wide. Just wanted to check if there was any fundamental aspect of serial/terminal handling that I needed to be aware of. If I know I can just completely manage it myself, no problem
The main reason for investigating propforth for this is the work you have done with multi-prop setups and making a 'virtual prop' with lots of cogs and pins which can have tasks allocated at runtime. I know this is technically mostly experimental, from a support point of view, but you've already done most of the work for me - fantastic! I'll let you know how I get on.
You mentioned v6 ... is there a timescale for this, or 'as and when'?
P
I will update the PF6 thread (or maybe start a fresh one) when I get my act together.
Once you get your head around it (and there's a git joke in there) it's pretty easy and very flexible.
This result "10 Prop0 Cog6 ok".
Word'do..+loop" cannot use negative number as increment-part.
Same as PF6?
I think that "do...loop" constructs probably terminates when the end value is less than the start value, so the loop terminates at the "do" before it even sees the -2 and the +loop. Thanks for testing this.