This video will describe the workings of an I2C scanner running on the Arduino Nano. This is a handy piece of software used to troubleshoot I2C projects.
I recognize all but two words. bit7 and set? Please share just those two. Nice video. I hope to do this with Flashforth and also with other FORTH varieties running on other MCUs.
bit7 is 128 and set? is mtst (check out the FlashForth word list) Since Forth is extendable I program as I go along and create these words. I have made a few videos featuring the Scamp3 board which is running FlashForth with all extra support words onboard to make it easier to get a program up and running. An I2C scanner is built in and is run by typing "modules".
@@RalphWLundvall mtst should work for set? Do you have an I2C device connected to the micro-controller, if not it will hang. The code for set? is: set? c@ and 0 = invert ; This is what mtst basically does.
@@0033mer Got scanner working. Added a PCF8574 only to find that if address is $20 (A0,1,2 = GND) pin 8 cannot be connected to ground (as your breadboard wiring shows no pin 8 GND) . Where in the datasheet is that handy tidbit?
Clear and useful, thanks.
Glad it was helpful!
Superb
I recognize all but two words. bit7 and set? Please share just those two. Nice video. I hope to do this with Flashforth and also with other FORTH varieties running on other MCUs.
bit7 is 128 and set? is mtst (check out the FlashForth word list) Since Forth is extendable I program as I go along and create these words. I have made a few videos featuring the Scamp3 board which is running FlashForth with all extra support words onboard to make it easier to get a program up and running. An I2C scanner is built in and is run by typing "modules".
@@0033mer Well I tried but failed. set? the same as mtst ? Seems it is doing more. I posted what I thought is the FF code on pastebin user rwl7532.
@@RalphWLundvall mtst should work for set? Do you have an I2C device connected to the micro-controller, if not it will hang.
The code for set? is: set? c@ and 0 = invert ; This is what mtst basically does.
@@0033mer Thanks. Late to read this. No youtube notification arrivrd.
@@0033mer Got scanner working. Added a PCF8574 only to find that if address is $20 (A0,1,2 = GND) pin 8 cannot be connected to ground (as your breadboard wiring shows no pin 8 GND) . Where in the datasheet is that handy tidbit?
Thanks you very much appreciated. Could you show/link-to the code for the forth in scani2c.txt please?
I did not post the code but there is an Arduino Forth website where you can download forth code: arduino-forth.com/