Quick Start Touch Demo plus Forth
prof_braino
Posts: 4,313
caskaz ported the touch sense demo to propforth.
This version adds running the demo at power up, and keeps the forth prompt running on the serial connection.
Needs propforthkerenl.spin loaded via proptool,
and the demo loaded via serial terminal.
This version adds running the demo at power up, and keeps the forth prompt running on the serial connection.
Needs propforthkerenl.spin loaded via proptool,
and the demo loaded via serial terminal.
Comments
I did experiments about RC-decay.
Sense-status of TouchSense on board is displayed on LCD.
QuickStart 2-wire_LCD I/F
P8 J1-9 ---- CN1-3 latch
P9 J1-8 ---- CN1-4 clock
P10 J1-11 ---- CN1-6 brightness
J1-38 ---- CN1-1 3.3V
J1-39 ---- CN1-2 Gnd
Loading 2_wire_LCD_1.4_QS.f.
Loading TouchSense_graph.f.
(There are a couple of 0x0 on statck. This is PF4.5's bug. This is fixed on next version.)
Executing WORD"graph".
I made DS1337 driver(rtc).
No function yet. Only read/write registers inside DS1337.
I translated DEMO: QuickStart - Push-ON / Push-OFF to PropForth.
http://forums.parallax.com/showthread.php?132795-DEMO-QuickStart-Push-ON-Push-OFF
I used Ariba's code(#19).
Thanks Ariba.
But not stable.
How do you modify codes to work?
Post 24 he tests on the other 50/60hz half-wave, this looks like the solution.
I tested 24LC1025(128k x 8bit) on QuickStart(64k).
fs.f don't use on 24LC1025.
Chip-select on 24LC1025 use only A0/A1. Bank-Select-Bit switch 64k.
I modified to fs_128k.f.
I modified only fsbot,fstop.fsps,eereadpage.
Only "fsls" can use on fs_128k.f. I stopped to modify codes.
In case of using 24LC1025, we can't use 0x8000 - 1ffff, although QS has 64k.
24LC1025 is expensive than 24C512. (more than 2times)
And 24LC1025 and 24C512 can't use same driver.
I think there is not merit to use 24LC1025.
How do you think?
Could this be related to whatwe saw in issue 25? http://code.google.com/p/propforth/issues/detail?id=25
We thought the issue was solved (a hardware problem) but seems to have returned.
I don't have any extra EEPROMs, I can only test 32k and 64k.
Sal could not reproduce the symptom either, which is why we thought it was unique to Brian's hardware.
If you already have the 24LC1025, then I would think a separate fsls-24LC1025.f file would be the way to go. The price usually drops eventually, and some folks may decide they need 1 of 128k instead of 2 of 64k.
Just thinking wihthout experimenting, does it look like we need multiples of the chip size so they address properly?
That is, Demoboard + 24LC1025 (32K +128k) has issue;
But Demoboard + 24C256 + 24C512 + 24LC1025 (32k + 32k + 64k + 128K) is OK ?
Next time I buy parts I should get EEPROMs, but this is not in my (wife's) budget at this time.
I think issue25 isn't related.
128k and 64k(32k) is different to access to chip.
64k(32k) send A0/A1/A2 on I2C. (total 8pcs)
128k(32k) send A0/A1/B0 on I2C.(total 4pcs)
Accessing 0x20000 for 128k send A0=1 A1=0 B0=0 and 0x30000 for 128k send A0=1 A1=0 B0=1.
Accessing 0x10000 for 64k send A0=1 A1=0 A2=0 and 0x20000 for 64k send A0=0 A1=1 A2=0.
Connecting 128k and 64k to same line might be conflict.
Using only 128k to external is no problem.
You need to modify fs.f to be able to use on 128k.
I did experiments about LED-sensor.
P12 --- 220ohm -- LED anode - LED cathode
P13
Executing WORD"LED" when bright around LED.
LED blink after 2seconds.
And then when it's dark above LED, LED is blinking. When It's bright, LED is off.
But this don't work on every LED.
I checked 5pcs.
3pcs LED was NG.
I measured voltages between LED-anode and cathode under same condition(same light intensy, same distance) when there is light on LED surface.
They(NG LED) was low voltage than working fine LEDs.
And executed WORD"test", you can check values(bright and dark).
LEDs(OK) is 1000000(decimal) under bright and 250000 - 400000 under dark.
LEDs(NG) is too big or unstable under bright and dark.
To prof_braino.
I don't use translate program.
I wrote rotary-encoder driver.
I updated.
I updated.
This occur count-miss because forth-word.
test1 sometimes occur miss when rapidly rotating encoder.
test2 can't count because often miss.
http://code.google.com/p/propforth/wiki/PropForthExtensions
When 5.0 is out, I plan to use the extensions page as checklist and gather up all the extensions.
When an exension has a working regression test that runs under the automated regression suite, I will (try to) add it to the achive for the recent release.
I made SteppingMotor driver.
Motor is bipolar type(TS3166N913).
Loading encoder_0.3.f
Loading SteppingMotor_0.1.f
WORD"full" = full-step
WORD"half" = half-step
RPM(Revolution per minute) of motor is changed by rotating rotary-encoder.
To do next:
Getting actual revolution by using sensor of stepping-motor
Operating micro-step
Connecting LCD
PS:
This curcuit occure damages in TA7291P when continuing rotation.
Output of TA7291P need to connect power-Tr or MOS-FET.
Very good work.
I updated SteppingMotor because SteppingMotor_0.1 was incorrect inside "half".
TA7291P become very hot when rapidly rotatation.
So I will change drive-IC(output-current: more than 3A) or build H-bridge-curcuit.
I translated BigFont of Aruduino to PropForth4.6.
(prompt messages is PropForth v4.5 2011JUL25 7:10 0.)
LCD is 16Character 4Line.
I found out strange.
I stored font-data in hub-memory by using "c,".
Display is strange from ascii-code 0x5f.
It seems that Datas is not correctly stored from 372th byte.
Loading 2_wire_LCD_1.5 and BigFont.
Executing "demo".
It's my mistake.
I also found out another wrong.
I will post correct code later.
I updated Bigfont.