Adafruit / GPIO Compatibility?

Hiraghm

New Member
May 18, 2019
24
5
3
I've been working on a Raspberry Pi project of late, and spending a lot of time on Adafruit's website both looking for info and components.
Looking at all the cool toys on their website, I thought maybe being able to use some of them with the Commander X-16 would be very cool.

I mean, they have accellerometer / gyroscope boards, barometric sensors, touchscreens, tiny stereo amplifiers, temperature sensors, cellular modules, and lots of other toys meant to work with Arduino and Raspberry Pi, via GPIO, i2c, spi serial TTL and stuff I understand even less.

Would an expansion card be possible that could talk to some of these devices? Or I suppose some of them could be talked-to via the user port?

Anyway, I just think the ability to interface with these things would add value to the X-16, both for us already interested and for those interested in hardware tinkering whose interest might be piqued.

Edit to add: How difficult would a python interpreter be to develop for the X-16? I don't yet know python, but I do know it seems to have really become popular among Linux hobbyists.
 
  • Like
Reactions: Swift34

Hiraghm

New Member
May 18, 2019
24
5
3
Okay, I feel stupid...
I just checked the FAQ thread... and saw where they are, in fact, going for Arduino shield compatibility.
Once I get over feeling stupid, I'm going to get real excited over this.
 
  • Like
Reactions: Swift34

easyprototype

New Member
Sep 21, 2019
7
1
1
Canada
Don't be.

Going for Arduino shield compatibility means duplicating the Arduino I/Os: SPI, I2C, multiple serial ports, Analog to digital, PWM... All sorts of specialized I/Os that are not on the current version of the X16.

The most cost-efficient way to add Arduino shield compatibility to the X16 is... to add an arduino to the X16.
 
  • Like
Reactions: Swift34

Hiraghm

New Member
May 18, 2019
24
5
3
Don't be.

Going for Arduino shield compatibility means duplicating the Arduino I/Os: SPI, I2C, multiple serial ports, Analog to digital, PWM... All sorts of specialized I/Os that are not on the current version of the X16.

The most cost-efficient way to add Arduino shield compatibility to the X16 is... to add an arduino to the X16.
The X16 is going to have expansion slots... could such compatibility be put on an expansion card?
 

GregZone

New Member
Sep 29, 2019
21
13
3
I just checked the FAQ thread... and saw where they are, in fact, going for Arduino shield compatibility.
Where in the FAQ did you read about X16 going for Arduino Shield compatibility? (sorry if I've just missed it)

I'm not sure that creating an Arduino Shield compatible interface would be all that useful. Firstly, any particular shield you wanted to attach would need X16 specific drivers / assembly routines written to support it. Secondly, a lot of the serial interfaces are driven by on-chip dedicated hardware resources on the microcontrollers that the Arduino library supports.

Certainly, there are plenty of fun & interesting hardware modules available, which are interfaced via the likes of I2C and SPI etc, so you don't need to go to full plug-in Arduino Shield connector support.

For interfacing to ad-hoc maker hardware modules you could certainly write some X16 Assembly code to bit-bash the required serial protocol, via a few CIA / PIA digital ports. The serial communication speed wouldn't be as fast as a modern embedded serial hardware microcontroller, but depending on the project, it's likely able to do what you'd need.

I imagine a generalised SPI / I2C interface would be useful on the X16, with some low-level routines written to assist communicating with various hardware modules at a higher level.

If I've missed this is the specs, then that would be great to have. Otherwise, it does seem more appropriate for an X16 hardware prototyping "expansion card", which someone will undoubtably make.
 
Last edited:

easyprototype

New Member
Sep 21, 2019
7
1
1
Canada
The X16 is going to have expansion slots... could such compatibility be put on an expansion card?
Yes of course, but the problem remains the interface between the X16 address/data bus and your chip. An Arduino is not a chip peripheral that you can hook on a 8-bit bus. And even if you manage to do that, you need to program your on-board Arduino as well as the X16. Or you program a FPGA as a chip peripheral (like a PIA or ACIA) to mimic all the Arduino's I/Os on one side and a 8-bit bus on the other.

Let's not forget that each I/O pin on the Arduino is multi-function.

Lots of job.

Most of the little breakout boards and most Arduino shields really only use 2 power pins and a serial port of some sort (UART, SPI, I2C) and/or a few I/O pins, never the entire Arduino pinout.

It would be much more adviseable to create an expansion board featuring each serial port on seperate headers as well as a few I/O and a ADC. From there you hook whatever pin you need to your gadget and all you have to program is the X16.
 

Hiraghm

New Member
May 18, 2019
24
5
3
Where in the FAQ did you read about X16 going for Arduino Shield compatibility? (sorry if I've just missed it)

I'm not sure that creating an Arduino Shield compatible interface would be all that useful. Firstly, any particular shield you wanted to attach would need X16 specific drivers / assembly routines written to support it. Secondly, a lot of the serial interfaces are driven by on-chip dedicated hardware resources on the microcontrollers that the Arduino library supports.

Certainly, there are plenty of fun & interesting hardware modules available, which are interfaced via the likes of I2C and SPI etc, so you don't need to go to full plug-in Arduino Shield connector support.

For interfacing to ad-hoc maker hardware modules you could certainly write some X16 Assembly code to bit-bash the required serial protocol, via a few CIA / PIA digital ports. The serial communication speed wouldn't be as fast as a modern embedded serial hardware microcontroller, but depending on the project, it's likely able to do what you'd need.

I imagine a generalised SPI / I2C interface would be useful on the X16, with some low-level routines written to assist communicating with various hardware modules at a higher level.

If I've missed this is the specs, then that would be great to have. Otherwise, it does seem more appropriate for an X16 hardware prototyping "expansion card", which someone will undoubtably make.
Question #7 here...
X16 FAQ
 

GregZone

New Member
Sep 29, 2019
21
13
3
Question #7 here...
X16 FAQ
Thanks. I was looking at the Facebook posted FAQ, which has a different paragraph under the same heading! ie...

What sort of expansions would be possible?
There will be 4 expansion slots that could be used for just about anything. One drawback of running at 8 Mhz will be that many chips like SID chips will not run that fast, so additional logic would have to be implemented on the card in order to communicate with the chip.


So that's interesting, but I guess not unexpected, that the two different FAQ pages are out of sync.
I wonder which FAQ is the most up to date? ie. If the "We plan to have compatibility with Arduino shields." (in the Forum FAQ) is the current plan?
 
May 22, 2019
409
211
43
There will be some unused GPIO pins that we can use for other things, but they won't be arranged like an Arduino shield, nor will they have the per-pin features that Arduino has for each pin.

As to Python... while a subset of Python is certainly possible, I doubt you'll see the full, object oriented version with all of the types that Python supports.
 
  • Like
Reactions: GregZone

easyprototype

New Member
Sep 21, 2019
7
1
1
Canada
There will be some unused GPIO pins that we can use for other things, but they won't be arranged like an Arduino shield, nor will they have the per-pin features that Arduino has for each pin.
I think you should update the "Commander X16 FAQ" you pinned in these forums and remove any mention of the Arduino shield to end further confusion.

You also mention that the entire bus will be available. Seeing how the memory map is crammed and that they are pushing for the four 32-bit wide expansion slots, I'm not sure this is going to be the case. I also remember David stating there will be no cartridge support (full bus access). Is the entire bus access still on the menu?

The FAQ also doesn't mention if the design is going to be open-source or proprietary.
 
May 22, 2019
409
211
43
I think you should update the "Commander X16 FAQ" you pinned in these forums and remove any mention of the Arduino shield to end further confusion.

You also mention that the entire bus will be available. Seeing how the memory map is crammed and that they are pushing for the four 32-bit wide expansion slots, I'm not sure this is going to be the case. I also remember David stating there will be no cartridge support (full bus access). Is the entire bus access still on the menu?

The FAQ also doesn't mention if the design is going to be open-source or proprietary.
The FAQ is exactly as Perifractic wrote it. I do not want to have multiple, inconsistent versions rolling around. At this time, the Facebook FAQ and specs pages are considered authoritative, so I need to echo those verbatim.

I'm not sure what the future holds, so it's possible that I'm wrong and they intend to use an Arduino header after all... but I suspect the Arduino header is really the VERA header, which will be full (of VERA.) You might contact Perifractic via the FB group to see if this needs to be changed.