USB to iic #175
Replies: 7 comments 4 replies
-
As far as I can see that FTDI chip doesn't ”speak” i²c but RS232 & Co. PC-BASIC can access serial ports and that chip is accessible as a serial port, so if that is the interface you need it may be possible to use PC-BASIC. |
Beta Was this translation helpful? Give feedback.
-
I am a little confused with "open" command. Is it setting the baudrate on the simulated com port which goes to the USB port or is it setting the baudrate on the external device? here is my simple test software. |
Beta Was this translation helpful? Give feedback.
-
I found the problem! |
Beta Was this translation helpful? Give feedback.
-
Hi,
Thank you for the respons.
I have looked in to the code and understand what you mean, but since it was more then 30 years ago I wrote sw code I am not really sure what to do. Should I compile an own version of PC-Basic? I think I need more help.
…________________________________
Från: udhos ***@***.***>
Skickat: den 15 januari 2022 02:58
Till: robhagemans/pcbasic ***@***.***>
Kopia: fakircurry ***@***.***>; Author ***@***.***>
Ämne: Re: [robhagemans/pcbasic] USB to iic (Discussion #175)
Maybe you could manually tweak ports.py:
https://github.com/robhagemans/pcbasic/blob/master/pcbasic/basic/devices/ports.py#L96
—
Reply to this email directly, view it on GitHub<#175 (reply in thread)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AW5X3URZUMCGUGCIASCCU43UWDPF3ANCNFSM5LZLXYNA>.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
What's the reason you're trying to use PC-BASIC to address this appliance? Do you have some complex legacy BASIC code that you are trying to reuse? If not, it might be much easier to use Python and the PySerial module directly - see https://pyserial.readthedocs.io/en/latest/pyserial.html. These are what PC-BASIC is built on, but PC-BASIC is primarily intended to closely emulate GW-BASIC along with that language's limitations and quirks, such as the limitation of the baudrate to a number of predefined settings with a maximum of 9600. I think for your purposes using Python and PySerial would lead to much simpler and easier to debug and maintain code - it's certainly cleaner than creating a modified version of PC-BASIC and using that. |
Beta Was this translation helpful? Give feedback.
-
Very good question. The only reason is that I have programmed in Basic earlier and know how it works, it is very easy to change in the sw and run it without compiler. To make a store short. I have built a large model train installation (analouge märklin). For two months ago I bought an Arduino to try what is possible to do with it, now the Arduino is controlling some gadgets. My new idea was to control the whole train installation, more then 100 relays. I found PcBasic and wrote a complete sw during christmas, at the same time I have put together hw for a part of the installation, and there I am. Totally crazy idea, but it keeps me be creative. Now you say "Phyton", never heard of it before I bought the Arduino, I will take a look at it. I have ordered a new usb-iic board (one chip and no internal comm), If it works, I am happy. Thank you for support. |
Beta Was this translation helpful? Give feedback.
-
Some information. After receiving the new USB to iic module everything works perfect. I have now written about 1000 lines of code and can comtrol my whole model train installation. All parts are controlled via a total of 160 relays and 24 inputs. Thanks for your help. |
Beta Was this translation helpful? Give feedback.
-
Hello,
My name is Tomas.
I am trying to use a chip (FTDI FT232R) that converts usb to iic. The intention is to use iic bus to control several pcf8574 (iic to parallell in/out). I have now tried a lot of combinations of comands in PC-Basic but it will not work. The chip is available on a small board from Robot Electronics in UK, there is also a link to FTDI and all documentation. Can somebody help me to figure out if it is possible to do it, and in that case what to do.
Beta Was this translation helpful? Give feedback.
All reactions