Go Down

Topic: BASIC Computer Board Design (Read 976 times) previous topic - next topic

Totara

Hi guys,

I am attempting to build a BASIC interpreter based off of a ATMega328. Essentially I will be taking the customised TinyBASIC library  (Or similar) and a slimmed down version of the TVOut library (Also customised) and loading it onto a custom board with a PS/2 port and RCA jack. I have completed the schematic for this and would be really thankful if someone could look over the board design just to check it will work. Basically its a ATMega328 development board, with a RCA jack and PS/2 port.

Thanks,
Totara

Graynomad

I'm not a fan of BASIC but I do like the idea, in fact we were talking about it on another thread WRT using Picaxe BASIC.

But is it even possible to fit a source code interpreter into a 328, or are you doing a p-code interpreter?

What's the diode for on the power input?

BTW the schematic is split over 2 pages for some reason.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

James C4S

When creating schematics, it always helpful to add the LETTER_L frame (or whatever paper size you want to use) from the Parts Library.  I usually place the left bottom corner at 0,0.

When when you print, you can select the same paper size and a scale factor of "1".  This will keep your PDF from being split across pages.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Totara

Yeah I am not sure about why the schematic is split over two pages. The diode is for short circuit protection. I will give you an overview of what I really want to accomplish here. Recently I watched the movie Jobs, and I thought it would be awesome to build something akin to the Apple I. With a basic text console, and running BASIC. I was thinking about adding a SD card, which means I should be able to follow most of the code in here http://hackaday.com/2012/05/01/arduino-basic-interpreter-using-lcd-keyboard-and-sd/, making it a bit easier, all I would really have to do is customize it and setup the TVOut library. If need be, I could always skip using the Arduino bootloader and flash directly to the chip, but that would be a LOT more work. So is my board design sound?

Totara


When creating schematics, it always helpful to add the LETTER_L frame (or whatever paper size you want to use) from the Parts Library.  I usually place the left bottom corner at 0,0.

When when you print, you can select the same paper size and a scale factor of "1".  This will keep your PDF from being split across pages.


Thanks for that, I will remember it for next time.

James C4S


So is my board design sound?

You haven't posted a board design.  You've posted a difficult-to-read schematic.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com

Graynomad

#6
Jan 27, 2014, 04:55 am Last Edit: Jan 27, 2014, 04:57 am by Graynomad Reason: 1
Quote
The diode is for short circuit protection.

Short circuit exactly where?

As it stands that diode will provide very brief protection against reverse voltage, and nothing else. I say "very brief" because if you apply a reverse voltage to the input the diode will almost instantly vaporise thus removing said protection. The rest of the circuit will follow in (roughly) two fifths of five eights of a poofteenth of a mS.

If you add a PTC you can get reverse protection. As for "short circuit" protection you may have to describe that better.

Now to the basic design, is it possible to get a decent interpreter into the 328? If so is there enough RAM to hold the user's source code? Is it possible to run an interpreter at the same time as generating raw video?

From that Hackaday article

Quote
this implementation of BASIC has you start each line of code with a line number, and doesn't allow for character editing once the line has been input.


Frankly that is useless as it stands, maybe OK as the base for something better but if that's the end goal I'd stop now.

You may be interested in this design which I think does what you are intending.

http://geoffg.net/maximite.html or http://geoffg.net/mini-maximite.html

This is quite popular in Oz and has an interpreter, video etc but uses a much more powerful chip. Olimex make a version as well.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

Isn't www.bitlash.net an interpreter? So it would seem possible to fit an interpreter.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Graynomad

Yeah I guess it is, only a single command line at a time though isn't it? But maybe that's what Totara has in mind.

Maybe TinyBASIC will fit, I just want him to be sure before spending time making hardware.

_______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

CrossRoads

Don't know, never used it. I thought it will run programs stored on SD card for example tho.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Totara

Sorry about the pdf file being on two pages. Here is the revised one. Also I have found something that should clear up a few doubts, http://www.youtube.com/watch?v=Xc72baqukxs, there is an example of someone who has got this working. And if I add a SD card, then I can make it load programs off of it, as this is a feature of TinyBASIC. So is anyone able to confirm if this board schematic is going to work?

Thanks,
Totara

Totara

Also, I followed the Make your own D*mn board tutorial for a lot of this, if the diode is removable, I will remove it. But if it does add any protection whatsoever, I may as well keep it.

Graynomad

#12
Jan 27, 2014, 10:51 am Last Edit: Jan 27, 2014, 10:56 am by Graynomad Reason: 1
But what can you actually DO with this, does it have IO ability etc.  Anyway it will be a fun project.

The schematic looks ok, I can't comment on the header pinouts for SV1 and the keyboard as I'm not familiar with them. The reset signal from the ISP header normally goes directly to pin 1 (Reset) not to the other side of the auto-reset cap as you have it.

Quote
But if it does add any protection whatsoever, I may as well keep it.

It does nothing as far as I can tell. I see in that tute he says it will "prevent damage if power is accidentally connected backwards." I don't see that, wire that backwards and it will blow up unless the power supply limits the current. Maybe I missed something, but it won't do any harm.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Totara


But what can you actually DO with this, does it have IO ability etc.  Anyway it will be a fun project.


I do plan on having IO capability, that is what the big female header is for. Other than that fun things like a text game and Hello World. Also I will write a few routines that can make it easy to test equipment, before I create the actual board design I may add a couple of things like motor drivers, servo drivers etc.


The reset signal from the ISP header normally goes directly to pin 1 (Reset) not to the other side of the auto-reset cap as you have it.


Thanks, I have fixed that.

Also, can anyone give me a quick explanation on which pins to connect for this here https://www.sparkfun.com/products/11362, its the SD card socket I wish to connect, but I have never used a SD card before in an Arduino project. Also with the TVOut library, I believe it will be very easy to reduce the size of it significantly. I would love to be able to have colored text in this project, but it looks unlikely. Is there anyone who believes it may be possible to get colored text in here?

Thanks,
Totara

Graynomad

#14
Jan 28, 2014, 01:40 am Last Edit: Jan 28, 2014, 01:43 am by Graynomad Reason: 1
Quote
Is there anyone who believes it may be possible to get colored text in here?

I think Nick Gammon experimented with colour but found it was a bridge just a little to far.

As for the SD interface, attached is a schem I used on a project, it may be some help but it's a different card holder so the pin #s will be different. Most pins are self-explanatory, there are 4 data pins but you only use 2 of them in SPI mode and off the top of my head I can't remember which 2, I assume D0 and D1 but maybe not.

EDIT: Google "micro SD pinout", pages like http://www.hobbytronics.co.uk/tutorials-code/tutorials-misc/pinout-microsd will help but remember this is the pinout for the actual card, the holder will be similar but will have extra pins so you have to map the card pins to the holder pins.

______
Rob
Rob Gray aka the GRAYnomad www.robgray.com

Go Up