Jump to content
IGNORED

(Re)learning embedded electronics for Atari mods


Recommended Posts

Since becoming very interested in the 'UltimateCart' project I have been intending to start the process of learning how to program modern embedded electronics - principally in the FPGA/CPLD arena. However, after getting bogged down by two 'beginners' books on that topic I thought it might be more productive to walk before I can run as it were and focus on more traditional devices like the PIC.

 

So long ago it makes me shudder to think about it, I took a physics degree whose primary component was electrical engineering. At that time I remember dabbling a little with PICs, but - given how important microcontrollers have become - there was surprisingly little laboratory material on programmable logic. I recall there was a lot of enthusiasm for the 16Fxx series of IC's however, which were just coming out when I was leaving. Accordingly I have today picked up (ho, ho, ho) a 16F59 and a 16F84 IC from ebay, primarily because I recognized their designation and both together were under £5!!! I wonder however if anyone could maybe suggest a more appropriate PIC chip to start learning on? At the end of the day I would like to be in a position where I am confident enough with these simple devices to jump up the evolutionary ladder and start in with CPLD's.

 

Obviously at the moment I am at that stage where my primary aim is to breadboard things together that are amusing or educational and deliberately not thinking about any grand design. However, once I start feeling a good footing, is it even possible to use PIC setups to create useful mods for the A8? Or do you really have to be hands-on with the more advanced reprogrammable devices?

Link to comment
Share on other sites

You can't use a micro to add hardware features like you can with an FPGA. Microcontrollers are better at interfacing, like for making SIO devices or creating joystick adapters. Although some very fast (ARM, possibly Propeller) processors can run fast enough to interface directly with 8-bit computers, you generally need programmable logic to achieve bus speeds. The good news is that there are a lot of cheap FPGA project boards out there to get you started.

Link to comment
Share on other sites

Hi!,

 

Since becoming very interested in the 'UltimateCart' project I have been intending to start the process of learning how to program modern embedded electronics - principally in the FPGA/CPLD arena. However, after getting bogged down by two 'beginners' books on that topic I thought it might be more productive to walk before I can run as it were and focus on more traditional devices like the PIC.

 

So long ago it makes me shudder to think about it, I took a physics degree whose primary component was electrical engineering. At that time I remember dabbling a little with PICs, but - given how important microcontrollers have become - there was surprisingly little laboratory material on programmable logic. I recall there was a lot of enthusiasm for the 16Fxx series of IC's however, which were just coming out when I was leaving. Accordingly I have today picked up (ho, ho, ho) a 16F59 and a 16F84 IC from ebay, primarily because I recognized their designation and both together were under £5!!! I wonder however if anyone could maybe suggest a more appropriate PIC chip to start learning on?

 

I don't like PICs too much, but your PICs are not a good options for starting today, as both are "ancient" today :)

 

Perhaps something like this: http://www.aliexpress.com/item/Free-Shipping-Diy-Electronic-PIC16F1503-I-P-MCU-8BIT-3-5KB-FLASH-14DIP-PIC16F1503-I-16F1503/32571591300.html

 

It is us$4 for 3 PICs, cheap!

 

Also, with those newer PICs you can the Atari ICSP to program without additional hardware!

 

Personally, I think it is easier to start with an AVR today, there are arduino mini boards at US$1.5 apiece in aliexpress or ebay, and there is a lot of information, code and examples available. Something like: http://www.aliexpress.com/item/New-Atmega328-5v-Version-Pro-Mini-Module-16M-For-Arduino-Compatible-nano/32293715267.html

 

Note that after you are familiar with arduino, you can build your own hw using the AVR chip alone.

 

 

At the end of the day I would like to be in a position where I am confident enough with these simple devices to jump up the evolutionary ladder and start in with CPLD's.

 

Obviously at the moment I am at that stage where my primary aim is to breadboard things together that are amusing or educational and deliberately not thinking about any grand design. However, once I start feeling a good footing, is it even possible to use PIC setups to create useful mods for the A8? Or do you really have to be hands-on with the more advanced reprogrammable devices?

It is certainly possible, but if you want interfacing to the CPU bus, a CPLD will be easier. Interfacing with the SIO bus is a lot easier, almost every micro today has an UART.

 

Personally, I like the newer ARM Cortex micros, but they are difficult to find in DIP packages, so for simple tests I solder them to a little adapter board. A modern ARM like stm32f103 it is so fast that you can process many instructions in one Antic cycle...

Link to comment
Share on other sites

You can't use a micro to add hardware features like you can with an FPGA. Microcontrollers are better at interfacing, like for making SIO devices or creating joystick adapters. Although some very fast (ARM, possibly Propeller) processors can run fast enough to interface directly with 8-bit computers, you generally need programmable logic to achieve bus speeds. The good news is that there are a lot of cheap FPGA project boards out there to get you started.

 

and

 

Hi!,

 

I don't like PICs too much, but your PICs are not a good options for starting today, as both are "ancient" today :)

 

Perhaps something like this: http://www.aliexpress.com/item/Free-Shipping-Diy-Electronic-PIC16F1503-I-P-MCU-8BIT-3-5KB-FLASH-14DIP-PIC16F1503-I-16F1503/32571591300.html

 

It is us$4 for 3 PICs, cheap!

 

Also, with those newer PICs you can the Atari ICSP to program without additional hardware!

 

Personally, I think it is easier to start with an AVR today, there are arduino mini boards at US$1.5 apiece in aliexpress or ebay, and there is a lot of information, code and examples available. Something like: http://www.aliexpress.com/item/New-Atmega328-5v-Version-Pro-Mini-Module-16M-For-Arduino-Compatible-nano/32293715267.html

 

Note that after you are familiar with arduino, you can build your own hw using the AVR chip alone.

 

 

It is certainly possible, but if you want interfacing to the CPU bus, a CPLD will be easier. Interfacing with the SIO bus is a lot easier, almost every micro today has an UART.

 

Personally, I like the newer ARM Cortex micros, but they are difficult to find in DIP packages, so for simple tests I solder them to a little adapter board. A modern ARM like stm32f103 it is so fast that you can process many instructions in one Antic cycle...

 

Many thanks chaps!!! These are just the kind of insight I was hoping to get.

 

Devices like the Arduino and Rapsberry pi are something I am totally unfamiliar with, although I really like the look of the LeMaker Guitar. I guess that is another area I am going to have to give a serious look at once I find my feet again.

Link to comment
Share on other sites

Hi!,

 

I like working with AVRs more than PICs as the architecture is more straightforward, but pick the one that has the features you need.

 

You can do this with an AVR!

Yes, modern microcontrollers are fast!.... see with an stm32f4:

 

http://cliffle.com/article/2015/06/05/introducing-glitch/

 

Edited by dmsc
  • Like 1
Link to comment
Share on other sites

Daniel said it best. Nothing wrong with PICs as they have a wealth of programmers and knowledge base but if you are interested in forward technology, ARM of some flavor is probably where to end up as they have processing speeds > giga Hertz and are up to octo cores. I think around $20 they hit a performance/price point that is good.

 

Bar none, the Arduino Uno AVR is the way to ease into micros. Personally I find the development of their C/C++ programming environment to be both the best and worst thing that ever happened! :) They seem to break more and more old code with every release and are kind of anal when it comes to feedback. Still, it is free, work or can be made to work, and has a good code base to work from. They are ~$5-6 for development kit to get started. I have several set up with 320x200 color LCD screens and uSD cards.

 

There is also the esoteric. Google ESP8266 WiFi chip to get an idea of what is available. These are so cheap I bought a couple maybe a year back. It is ~Micro SOC with built in WiFi and fully programmable in Lua. Some what limited in the number of I/O pins but it is hard to argue against a postage stamp micro with buit in WiFi for $4. My son set up a development station and currently has them running a smart sign and security cameras he did for his employer. I mention this more for what's available then practical use at this time. The kits are all over the place, everything from bare chip on a board to logic level converters and regulators. By the time you get to Atari i.e. 5V logic levels, they price is getting up to ARM levels.

Link to comment
Share on other sites

I suggest this fpga board: http://www.terasic.com.tw/cgi-bin/page/archive.pl?No=83

 

There are labs to get started. It can get complicated but they start from the basics. Eg two switches -> and gate -> led.

 

As for books, this is my favourite:

http://www.amazon.co.uk/RTL-Hardware-Design-Using-VHDL/dp/0471720925

 

Though I'd advise that you don't need to read it, or similar, before starting to play.

Edited by foft
  • Like 1
Link to comment
Share on other sites

I remember 15+ years ago you couldn't really get a good FPGA demo board because they didn't pin-lock well. That is, FPGAs didn't have the routing resources to guarantee your signals would exit the chip in a fixed place. So if you made your board before you did your FPGA synthesis, it might not work or it might waste a lot of internal resources in an attempt to force your pin assignments (like running signals through extra function blocks just trying to reach the desired pin) . Also, your board could become an impediment as you updated/changed your core design.

 

Today pin-locking doesn't seem to be much of an issue.

Link to comment
Share on other sites

Glad to have been a factor in rekindling your interest in electronics!

 

I'd also suggest an arduino as a good place to started. Either an official Uno board, or one of the clones:

e.g. http://hobbycomponents.com/boards/522-hobby-components-arduino-compatible-uno-r3-and-usb-cable

 

One with an attached breadboard is also very useful for prototyping:

e.g. http://hobbycomponents.com/kits/654-experimental-kit-platform-uno-cable-and-breadboard

 

Both of these have the DIP form of the atmega328 - this makes it a lot easier to remove the chip if you fry it, or (more likely) so you can experiment with transferring your design to a breadboard/PCB. Very little supporting infrastructure is required by the microcontoller, and its very satisfying/educational to get a project running on a bare chip.

 

EDIT - there are lots of resources (tutorials etc) on the arduino website:

https://www.arduino.cc/

 

I'd also second foft's suggestion of a Terasic DE1 board once you feel ready to move on to CPLDs/FPGAs. Alternatively (and for free) you could simply use your ultimate cart as a Max10 development board, and though you've only got a single LED on board to flash, you could use the cartridge port connector as a bunch of GPIO to connect to other devices e.g. buttons/leds.

 

You might also prefer to try an intermediate step of a CPLD before going to an FPGA.

I got one of these boards:

http://www.seeedstudio.com/depot/XC9572XL-CPLD-development-board-v1b-p-799.html?cPath=6_10

It uses the Xilinx XC9500XL series CPLD, which is widely used in retro-computing projects, and is a bit easier to get started with than an fpga when it comes to moving your design to a PCB. It was a useful intermediate step for me, and gave me the confidence to move onto FPGAs.

 

Robin

Edited by electrotrains
Link to comment
Share on other sites

Wow!!! This is all absolutely fascinating material chaps!!! I especially like how it is possible to link these things so 'easily' to a display screen as dmsc and Bryan demonstrate. That was always very forbidding with the old electronics. Being able to see and get instant feedback on your work is absolutely essential, at least to how I personally learn. You really needed an oscilloscope and logic analyser before even starting to think of a practical application - and the fact these are way out of my price range has held me back over the last few years when I have felt the urge to do some electronics again.

 

More than any other area I have found programmable logic almost impenetrable - all the books and most on-line tutorials assume you have a degree of understanding, even at the entry level which I simply do not. It is a generational thing I think and my struggle is principally because I am still looking at things from the perspective of 1986. I am trying to take things right down to brass tacks whereas to get a grip on modern electronics you have to accept a degree of removal, abstraction from the actual components - similar to the difference between low-level ASM and high-level programming 'Visual BASIC'. To extend that simile; I have personally always taken the middle ground with 'C' and sometimes object pascal, a bit of both. Maybe I can do something similar with one from among these excellent development boards you have recommended. However, it does make me wonder how they start undergraduate EE hopefuls these days and even more how kids get in to the hobby arena without formal training and guided labs. I guess it is exactly these boards, where pin headers, USB stacks and LEDs are hardwired in place to provide instant and reliable feedback.

 

On the other hand the reason I like these really, really basic PIC IC's is because if you programme in ASM through MPLAB you can go right down to addressing individual registers - and indeed using what they call 'registers' as general purpose memory locations. My hope is that when I get comfortable with a 16Fxx then I will properly appreciate the advancements of later 18Fxx chips and ultimately CPLD/FPGA setups. I draw the parallel here between learning to programme in 'C' first before using MFC - or perhaps more relevant these days .NET.

 

I had mentioned to Robin behind the scenes that I had finally gotten hold of a USB Blaster for the UltimateCart, so using it as a ready-made development board really appeals to me - especially co-opting the cartridge-slot pads as output channels. I think it is the mean and penny-pinching Yorkshireman coming out!!!

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...