Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

A couple of learning questions

Status
Not open for further replies.

twist2b

New Member
YAY, first post!
Now excuse the fact that I am new to low end electricity. I have worked with high end ALOT but controls is still new :O.

So, a couple of questions:

1. I need to design a circuit board with an on-board memory connector. It would be a micro sd card connector. (I have a good link of the kind of micro sd card connector but I cant until I post 3 times so..) But I don't know what program would be best to design my board.

2. For #1 I don't know what MCU would be best. Something a little more intense I guess since the memory is a 3.2 volt high in comparison to a 5 high. Also the adapter uses USB low speed, which would be slow for accessing
files.

3. Were is a good place to buy parts/hardware? I am still new to this so any help relating this would be cool. Also I need a programmer, I heard there was a good one for like 20 bucks. So what you guys think?


Anyone willing to help me get started, that would be awesome. I don't want you guys to have to be a crutch, its just I need help getting on my feet and getting started. So thanks for any help you can give.
 
hi, welcome to the forum.
it could be rather difficult to communicate with this SD adapter, as you would need to implement a usb host controller protocol.
how does usb work?
no idea. the USB people are NOT forthcoming with specs etc. they want $4000 a year or something.

it would probably be easier to interface the SD card directly to the microcontroller.
as far as im aware, SD cards use SPI which is synchronous, meaning they do not have a MINIMUM speed. im not sure how the SPI is implemented for SD.

if you are new to microcontrollers and the like, i would start with something more simple.
a helpful tutorial i learned a lot from.
**broken link removed**

this uses the PIC16F84 PIC microcontroller made by microchip. it is very basic, but useful.

if you want something with more capability, you can use a 16f628, 16f88 or a 16f877.

My programmer is the velleman K8048 kit programmer. it's simple, but lacks software control of the VDD line(is controlled by a switch instead). this is ok, but you could find yourself in an annoying situation if you accidentally disable the MCLRE bit of the configuration word.

that is the PICmicro by microchip.
there are other MCUs out there such as the parallax propeller(VERY weird architecture, 8 cores with a total of 160 MIPS) or AVR(dont know much about them).
you could also try an 8051(will require an eeprom programmer, no internal flash) or an AT91(same situation).

PICs are the least powerful in terms of memory and speed, but there are the parallax SX MCUs, which run the same machine code as the PIC and are MUCH faster, but they need a different programmer. PICs are also the cheapest.

there are also the BASIC stamps, which are circuit boards that contain an MCU, memory, a voltage regulator and other stuff. the MCU interprets BASIC code. these are generally slower than the PICs, but easy to program.

personally i would go with a PIC or a propeller.

as far as PCB design goes, i dont really know the best program. ive heard a lot of people use EAGLE. i use gEDA PCB because it runs on linux.


I get all of my parts from maplin(in the UK) and farnell.com

about voltages:
3.2v circuits can be interfaced to 5v circuits via a "level shifter".

EDIT: on programmers: you can build an "EL Cheapo" programmer for PICs. if built correctly, it shouldn't be any better or worse than any other programmer.

for the development environment for PICs, you can use microchip's MPLAB, or, if you are using linux, you can use pikdev.
 
Last edited:
Thank you for your response! I am going to study the site you gave. I am pretty excited.

Maybe I should explain what I am doing considering maybe I missed something.

I am doing MANY projects, But I want to start easy and work my way up.
I want to make my SNES controller to work usb, AND have internal memory to hold the roms and emulator (kinda like a flash drive and a controller at the same time).
I have made a SNES controller work usb, thats not a problem at all!
But adding memory can be a pain.


Now I know what you guys are thinking. EASY!!!! Just put a small usb hub in there and add a 2 GB flash drive inside there connect it to the usb hub, then connect the controller (I use this a chip made by ralph that was designed for the controller because I dont have a programmer)
I DONT want that though. I want to put roms on a micro sd card and have the slot on the inside but have a hole so that you can push it into the controller and then push it again and it pops out (the sd connector would be a push-push) This way you can edit what kind of information like if you want to add/subtract roms or anything like that.
Sorry for a bad explanation but I am kind of tired and going to bed after this post.
My main goal is to make it user friendly.

Oh, and making schematics of a board for companies to make it and send it to me... you said most use eagle. I heard this was good aswell, but wanted a second opinion. You have confirmed it so thank you.

You answered so many questions, and for that I lift my hat to you.... thanks.
 
Sorry for a bad explanation but I am kind of tired and going to bed after this post.
quite alright, i personally am knackered right now.(maybe it's something about us engineering folk...)

i think i see now.
you need something to sit between the microSD card and the usb hub which is able to load data off of the card, and act like a big flash drive to the usb hub.

if this is indeed the task, i doubt that a PIC would be able to handle it. maybe one of those AT91s...
you're gonna need to write software for your MCU to read the files off of the card, and store them on some kind of non-volatile memory chip.
as well as the USB client protocol and whatever protocol is required to "emulate" a flash drive.(which im sure USB people dont want to talk about)

you could use an FTDI chip for the USB interface, which gives USB->basic Serial which could then be interfaced directly to your MCU, but it wouldn't be recognised as a drive. you would need to write a device driver for your MCU(i have no idea how to do this in windows) to be recognised as a drive on your computer.

by no means is what you are suggesting impossible, but it's harder than anything ive done.
that is assuming i have the right idea.
 
Thank you for your response! I am going to study the site you gave. I am pretty excited.

Maybe I should explain what I am doing considering maybe I missed something.

I am doing MANY projects, But I want to start easy and work my way up.
I want to make my SNES controller to work usb, AND have internal memory to hold the roms and emulator (kinda like a flash drive and a controller at the same time).
I have made a SNES controller work usb, thats not a problem at all!
But adding memory can be a pain.


Now I know what you guys are thinking. EASY!!!! Just put a small usb hub in there and add a 2 GB flash drive inside there connect it to the usb hub, then connect the controller (I use this a chip made by ralph that was designed for the controller because I dont have a programmer)
I DONT want that though. I want to put roms on a micro sd card and have the slot on the inside but have a hole so that you can push it into the controller and then push it again and it pops out (the sd connector would be a push-push) This way you can edit what kind of information like if you want to add/subtract roms or anything like that.
Sorry for a bad explanation but I am kind of tired and going to bed after this post.
My main goal is to make it user friendly.

Oh, and making schematics of a board for companies to make it and send it to me... you said most use eagle. I heard this was good aswell, but wanted a second opinion. You have confirmed it so thank you.

You answered so many questions, and for that I lift my hat to you.... thanks.

if youve already got the snes controller to work with usb why don't you you just put a SD/micro SD card reader in the controller. and run another usb cable in to the computer. i did that with a XboX controller but it is way easier with that because xbox used usb from the start so its only matching usb wire colors.
 
if youve already got the snes controller to work with usb why don't you you just put a SD/micro SD card reader in the controller. and run another usb cable in to the computer. i did that with a XboX controller but it is way easier with that because xbox used usb from the start so its only matching usb wire colors.

1. Thats not cool at all, there would be no difference in just putting the usb drive in the computer separately.
2. I am making this for someone else, who wants everything inside the controller and wants to plug in at a school computer or anywhere and just play.


I decided though, I am going to use a 1 GB flash drive, a usb hub and the controller... its easier and works close to just as well as I want.
 
1. Thats not cool at all, there would be no difference in just putting the usb drive in the computer separately.
2. I am making this for someone else, who wants everything inside the controller and wants to plug in at a school computer or anywhere and just play.


I decided though, I am going to use a 1 GB flash drive, a usb hub and the controller... its easier and works close to just as well as I want.

yeah but you said you did not want it that way.....and it is cool. jk brah'
 
Ok, so doing a freakish amount of research....
Here is my decision:
Just wondering.....
How hard would it be to make my own:
1. USB flash drivehttps://www.electro-tech-online.com/newreply.php?do=newreply&noquote=1&p=354348
2.USB hub
3.controller "translator" (I like to use simple words :p )

All on one board. I have found all the necessary chips but I don't know if actually building any of these is VERY hard or just hard.


Also the app I use to make PCB is Pulsonix.... and Its SOOO limited in it's component library. Any way to fix this? (eagle does not work on my computer for some reason o_O )

Thanks for any answers!
 
usb hub chip:
**broken link removed**

THAT is what I am talking about! I want to just have a chip, that way the cavity will stay large.
For a PCB creator... like Pulsonix, how would I get the component library for this so that I can make a PCB with this chip?

Also, If I took a really old keyboard.... and wired up the controller as keys, but it used the old port instead of USB.... what do I do? Like I don't know the difference.

(converting PS/2 connection to USB connection)

Edit- What I am tryin to say is:
Can I screw port 2 and 6 on the ps/2 connection and just cut them out.... because:
6-pin PS/2 Plug
1 – Data (USB D– pin)
2 – NC
3 – Ground (USB Ground)
4 – +5V (USB +5V)
5 – Clock (USB D+ pin)
6 – NC
As you can see 2 and 6 are the same thing..... considering I have never worked with PS/2.... I don't know the importance of "NC"
 
Last edited:
As you can see 2 and 6 are the same thing..... considering I have never worked with PS/2.... I don't know the importance of "NC"

NC = not connected

USB is a four wire bus: +5V, Gnd, D+, and D-.

PS/2 and USB are not compatible.
 
Last edited:
BTW D- is not data and D+ is not clock. PS/2 is an old fashion "dumb" interface. USB has a complex protocol that requires a hardware "engine" for its implementation.
 
BTW D- is not data and D+ is not clock. PS/2 is an old fashion "dumb" interface. USB has a complex protocol that requires a hardware "engine" for its implementation.

No, I know what things like data, clock, latch... all of those things are. But USB to PS/2 is what I was talking about. (working backwards, so saith the PDF of a converter company.........)
I will just find a usb keyboard.
 
I find it nice at least that most usb keyboards (mice) can be used (converted) to PS/2 with only a small hardware adapter no electrical change. Maybe just emulated PS/2 on the USB so i can work for both.
 
I find it nice at least that most usb keyboards (mice) can be used (converted) to PS/2 with only a small hardware adapter no electrical change. Maybe just emulated PS/2 on the USB so i can work for both.

Yea, I know what your saying. The only problem is that I can't really have an adapter, since I am close to filling the controllers cavity with what I already have! Haha, but again, if I work with MCU's. Then:
1. the cavity will still be HUGE
2. I wont have to worry about the adapter.
 
Yea, I know what your saying. The only problem is that I can't really have an adapter, since I am close to filling the controllers cavity with what I already have! Haha, but again, if I work with MCU's. Then:
1. the cavity will still be HUGE
2. I wont have to worry about the adapter.

The 'adaptor' is just a dumb device, because the mouse itself contains all the electronics and programming for both USB and PS2, all the adaptor does is select with part of the mouse to use. If you've got an older non-USB mouse, then the 'adaptor' won't do anything with it.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top