Programming MSX basic for I2C devises.

By frits9164

Resident (64)

frits9164's picture

25-03-2012, 19:19

Hello everyone, I need help

How can I control a device with MSX Basic as I use the parallel- and addressports to I2C??Question
With kind greetings,
Frits9164

Login or register to post comments

By frits9164

Resident (64)

frits9164's picture

27-03-2012, 01:49

Vriendelijk verzoeken is hier niet mogelijk, want GAME's zijn belangrijker dan een probleem helpen te op te lossen!
Crying Dus mijn engels is ook vergeten, dus de vraag nog een keer: Hoe kan ik vanuit mijn MSX een programma schrijven in het Basic om een I2C apparaat aan te kunnen sturen. Zijn daar poke's en peek's voor nodig of zijn daar andere commando's voor nodig.
Ik wil namelijk mijn MSX gebruiken om via I2C  een Project aansturen om het iets te laten doen en dan gegevens terug te ontvangen!

Friendly request is not possible here, because GAME are more important than a problem to help solve!

So my english is forgotten, so the question again: How can I from my MSX write a program in Basic to an I2C device that can send. His peek and poke it's needed or are there other commands needed.

Because I want my MSX use a Project via I2C control to do something and then receive data back!Question

By Gradius2

Hero (598)

Gradius2's picture

27-03-2012, 05:22

Look here:
http://fms.komkon.org/MSX/Docs/Portar.txt

On basic you must use OUT (to write) and INP (to read) the port.

By NYYRIKKI

Enlighted (5587)

NYYRIKKI's picture

27-03-2012, 13:20

Sorry, not possible... paraller is one direction only and BASIC interrupt handler messes up joyport I/O

By Sky_hawk

Champion (267)

Sky_hawk's picture

27-03-2012, 14:02

The paralel port has 8 bits output, out &h90,value and 1 input (? imp &h91), but if driving a I2c device from basic is possible depends on the speed the device needs.

Theoretically I2C looks possible to me. 
So also http://www.maxim-ic.com/app-notes/index.mvp/id/3230
never mind that they talk about PC paralel ports, the required lines are also present on MSX.

(D0, D1, busy and ground)

Greetings,

Jan

By NYYRIKKI

Enlighted (5587)

NYYRIKKI's picture

27-03-2012, 14:53

Ah, my bad... I thought SCL needed to be bidirectional as well...

By Gradius2

Hero (598)

Gradius2's picture

27-03-2012, 15:30

Back in 1986, an eletronic friend of mine did a big LED array controlled by MSX PPI.

It worked like wonders, and it was amazing at that time.