Author Topic: Searching a microcontroller  (Read 21645 times)

0 Members and 1 Guest are viewing this topic.

Offline pyroespTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Searching a microcontroller
« on: March 31, 2013, 03:35:46 am »
Hello guys,

I've been searching a microcontroller for a couple of days, but I can't seem to find the right one.
Maybe you guys can help me out.
I have only 3 requirements for this microcontroller:
- Minimum 30 I/O + 2 I/O extra for USB or USART
- Minimum operating frequency 30MHz (the higher the better) with 1 instruction/clock cycle
- Needs to work at 5V

I've searched AVRs, PICs and STM, as those are the ones I have already worked with in previous projects.
The problem with AVRs it's either I don't have enough I/O, or the operating voltage is too low (3V3 or 3V6)
With PICs, the problem is the instruction cycle that takes 4 clock cycles. I need 1 instruction per clock cycle because of restricted timings I need to follow.
STM8 and STM32 microcontrollers have an operating voltage of max 3V6, which isn't enough.

An STM32 would be awesome to use, but I would like to avoid the use of (bidir.) level translator for each I/O...

Thanks for your help everyone !
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2053
  • Country: us
Re: Searching a microcontroller
« Reply #1 on: March 31, 2013, 03:47:38 am »
What's your application?
If it is for hobby, take a look at the Parallax Propeller. It is basically an 8 core chip that can run at up to 80MHz. You can turn cores on and off. There are no peripherals because you are supposed to use cores to create the peripherals. You do software UART on one core and other stuff in the next core. You can turn cores on and off.

Some 18F PICs can run at 64MHz and some 24F and 32F can un at more than 80MHz. I believe these execute 2 instructions per second but I'm not sure.
 

Offline madshaman

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: ca
  • ego trans insani
Re: Searching a microcontroller
« Reply #2 on: March 31, 2013, 03:47:50 am »
I assume there's some timing constraints on all 30 pin ssuch that io expansion isn't a viable solution?
To be responsible, but never to let fear stop the imagination.
 

Offline VanitarNordic

  • Frequent Contributor
  • **
  • Posts: 283
  • Country: 00
Re: Searching a microcontroller
« Reply #3 on: March 31, 2013, 07:32:32 am »
You can try LPC series. the supporting compilers are also user friendly.
 

alm

  • Guest
Re: Searching a microcontroller
« Reply #4 on: March 31, 2013, 09:58:45 am »
30 MHz (with 1 IPC) and 5 V is going to be tricky. 30 MHz implies a 16/32 bit part, but these are usually 3.3 V.

I believe there was a somewhat unknown vendor offering 5 V ARM Cortex parts, these might fit the bill.

Also try the parametric search on sites like Digikey, there may be lesser known manufacturers like Freescale or Renesas that have suitable parts.
 

Online AndyC_772

  • Super Contributor
  • ***
  • Posts: 4570
  • Country: gb
  • Professional design engineer
    • Cawte Engineering | Reliable Electronics
Re: Searching a microcontroller
« Reply #5 on: March 31, 2013, 10:30:29 am »
On the STM32 family, many I/O pins are 5V tolerant, so you can connect a 5V logic input to them directly. You may also find your connected device will accept 3.3V as a valid logic '1'. Same also applies to PIC32.

Offline amyk

  • Super Contributor
  • ***
  • Posts: 9176
Re: Searching a microcontroller
« Reply #6 on: March 31, 2013, 11:12:36 am »
Try the STC10F/11F series:
- 40 I/Os, 1 UART (no USB, sorry)
- up to 35MHz 1T 8051 core
- 5V operation
 

Offline BravoV

  • Super Contributor
  • ***
  • Posts: 7572
  • Country: 00
  • +++ ATH1
Re: Searching a microcontroller
« Reply #7 on: March 31, 2013, 11:20:07 am »
I believe there was a somewhat unknown vendor offering 5 V ARM Cortex parts, these might fit.
Fyi, TI ARM Cortex mcu's gpio is 5 volt tolerant.

alm

  • Guest
Re: Searching a microcontroller
« Reply #8 on: March 31, 2013, 11:22:45 am »
If you go through the specs, VOH(min) of 3.3V and VIH(min) of 5V logic are usually too close for comfort, or even VOH < VIH. So you still need level translation on the output / bi-directional pins.
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Searching a microcontroller
« Reply #9 on: March 31, 2013, 11:37:36 am »
- Needs to work at 5V

I realize this is on your list of requirements.  But perhaps the ease of development, speed, IO, coding examples, accessories etc of these two could offer an attractive alternative?

https://www.sparkfun.com/products/11589

https://www.sparkfun.com/products/8745

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Searching a microcontroller
« Reply #10 on: March 31, 2013, 11:56:17 am »
- Minimum operating frequency 30MHz (the higher the better) with 1 instruction/clock cycle
This will be difficult to achieve on any chip, as it depends on more factors than the core (eg. faster MCUs usually have some kind of flash prefetch/cache that can add timing variability). If the goal is to bit-bang waveforms it is probably better achieved using a chip with a DMA controller.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30367
  • Country: nl
    • NCT Developments
Re: Searching a microcontroller
« Reply #11 on: March 31, 2013, 12:57:45 pm »
Hello guys,

I've been searching a microcontroller for a couple of days, but I can't seem to find the right one.
Maybe you guys can help me out.
I have only 3 requirements for this microcontroller:
- Minimum 30 I/O + 2 I/O extra for USB or USART
- Minimum operating frequency 30MHz (the higher the better) with 1 instruction/clock cycle
- Needs to work at 5V

I've searched AVRs, PICs and STM, as those are the ones I have already worked with in previous projects.
The problem with AVRs it's either I don't have enough I/O, or the operating voltage is too low (3V3 or 3V6)
With PICs, the problem is the instruction cycle that takes 4 clock cycles. I need 1 instruction per clock cycle because of restricted timings I need to follow.
STM8 and STM32 microcontrollers have an operating voltage of max 3V6, which isn't enough.

An STM32 would be awesome to use, but I would like to avoid the use of (bidir.) level translator for each I/O...
IMHO you shouldn't base a new design on 5V chips because these will become obsolete quickly. Like other people said many ARM controllers have 5V tolerant I/O. If you really want 5V and high speed you can look at the H8S controllers from Renesas. There is a GCC version available for compiling software written in C for these controllers. You might need a dedicated flash programmer though. Expect things to get expensive!

There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline lgbeno

  • Frequent Contributor
  • **
  • Posts: 355
  • Country: 00
Searching a microcontroller
« Reply #12 on: March 31, 2013, 01:41:19 pm »
I agree 5 v io is a thing of the past, the only reason it sticks around is Arduino/AVR.  Most likely you will have to level shift down to interface to many of the other chips that you want to talk to.

One option could be to select a 5v tolerant mcu and then use pull ups to 5v and open drain outputs to drive signals.  Not the most power efficient but might be your best choice.
 

alm

  • Guest
Re: Searching a microcontroller
« Reply #13 on: March 31, 2013, 02:25:31 pm »
Good luck with that if you want to achieve MHz signaling speeds. You will need some pretty low value pull-up resistors to overcome the parasitic capacitance that you have to charge within that 10 ns or so.
 

Offline pyroespTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Searching a microcontroller
« Reply #14 on: March 31, 2013, 02:40:33 pm »
Hello guys,

Thanks for all the awesome replies!

I'll explain what I would like to do.
I have a Sega Master System, you know, those 8 bit game console from 1989 or so. The games are in those big cartridges.
I want to have some sort of a rewritable cartridge via USB.

The CPU (Z80) works at 3.5MHz, it needs 2 clock cycles for an opcode read from ROM and 3 clock cycles for a data read or write from ROM/to SRAM.
I basically need to make a link between the Z80 CPU and the "ROM" (I'll probably use flash).

The CPU only has 16 address lines so only 64kB can be accessed, but most of the games have a mapping chip. Those mapping chip makes it so you can access up to 1MB of data.

I know 5V is oldschool, but the console itself is oldschool. I can't just change the voltage to 3V3.

I assume there's some timing constraints on all 30 pin ssuch that io expansion isn't a viable solution?
You are correct.

On the STM32 family, many I/O pins are 5V tolerant, so you can connect a 5V logic input to them directly. You may also find your connected device will accept 3.3V as a valid logic '1'. Same also applies to PIC32.
I don't think I'll have 30 I/O that are 5V tolerant but I'll check it.

Try the STC10F/11F series:
- 40 I/Os, 1 UART (no USB, sorry)
- up to 35MHz 1T 8051 core
- 5V operation
Going to check this one, thanks.

You can try LPC series. the supporting compilers are also user friendly.
Don't know about these, I'm going to check them.

Some 18F PICs can run at 64MHz and some 24F and 32F can un at more than 80MHz. I believe these execute 2 instructions per second but I'm not sure.
I won't use PICs even though I like PICs. The fact they use 4 clock cycle to execute an instruction makes it too slow for the application.


Thanks again for all the replies!
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Searching a microcontroller
« Reply #15 on: March 31, 2013, 03:18:59 pm »
I want to have some sort of a rewritable cartridge via USB.
I would hold the CPU in reset while the USB circuitry reprograms the flash/SRAM. That way you only need jellybean logic for the bus interface.

Quote
I won't use PICs even though I like PICs. The fact they use 4 clock cycle to execute an instruction makes it too slow for the application.
PIC24/dsPIC33 use 2 cycles per instruction.

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 9056
  • Country: us
    • SiliconValleyGarage
Re: Searching a microcontroller
« Reply #16 on: March 31, 2013, 03:23:44 pm »
Wrong approach. Even though the cpu may be one instruction per clocktick, io access may take multiple clockticks.....

A ram with a few 74244 does the trick ... Set the 244 in isolation mode , enable drivers from the cpu and load the program. Then disable cpu drivers and re enable 244.. Done.  Basic rom emulator.
Been done for ages like that.

I got a few commercial rom emulators laying around. Ill post some pictures of how they are built.
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30367
  • Country: nl
    • NCT Developments
Re: Searching a microcontroller
« Reply #17 on: March 31, 2013, 03:37:04 pm »
I agree. A ROM emulator is what you want. A few BUS isolators like the HC245 / HC544 will do the trick to isolate an SRAM from the Sega's bus so you can write data from the microcontroller. If the microcontroller has its pins floating when its not writing te SRAM then you won't need bus isolators between the microcontroller and the SRAM.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline pyroespTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Searching a microcontroller
« Reply #18 on: March 31, 2013, 06:04:13 pm »
I know pretty much how I have to do it. The problem is timing.
The I/O are mostly set to input (tri-state), just to read the address lines.
The mcu needs to work as a mapper, I won't go into details but I need to be able to link a 1MB ROM to a Z80 CPU that has 16 address lines.

I want to have some sort of a rewritable cartridge via USB.
I would hold the CPU in reset while the USB circuitry reprograms the flash/SRAM. That way you only need jellybean logic for the bus interface.

Quote
I won't use PICs even though I like PICs. The fact they use 4 clock cycle to execute an instruction makes it too slow for the application.
PIC24/dsPIC33 use 2 cycles per instruction.
I'm going to check those PICs, thanks.

Wrong approach. Even though the cpu may be one instruction per clocktick, io access may take multiple clockticks.....

A ram with a few 74244 does the trick ... Set the 244 in isolation mode , enable drivers from the cpu and load the program. Then disable cpu drivers and re enable 244.. Done.  Basic rom emulator.
Been done for ages like that.

I got a few commercial rom emulators laying around. Ill post some pictures of how they are built.
I'd like to see those. Thanks
 

Offline andersm

  • Super Contributor
  • ***
  • Posts: 1198
  • Country: fi
Re: Searching a microcontroller
« Reply #19 on: March 31, 2013, 06:20:33 pm »
Based on this description, the mapper can be implemented as a bit of address decoding logic and a few octal latches. Using a microcontroller for that is just overcomplicating things.

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30367
  • Country: nl
    • NCT Developments
Re: Searching a microcontroller
« Reply #20 on: March 31, 2013, 06:53:00 pm »
My idea exactly. Even a really fast microcontroller won't be able to keep up with an address/data bus. The best option is a CPLD. Using standard logic chips is feasible but there may be issues with timing. Using 3.3V logic with 5V tolerance isn't a problem. For TTL anything over 1.4V is regarded as '1' and anything below 0.8V a '0'.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

alm

  • Guest
Re: Searching a microcontroller
« Reply #21 on: March 31, 2013, 07:34:10 pm »
For TTL logic maybe, but for CMOS logic the threshold is much closer to Vcc. I wouldn't trust a 5V powered 74HC to work correctly when driven from 3.3 V CMOS logic, for example. VIH for the 5V part is more like 3V then. Of course you can use 74HCT.
 

Offline madshaman

  • Frequent Contributor
  • **
  • Posts: 698
  • Country: ca
  • ego trans insani
Re: Searching a microcontroller
« Reply #22 on: March 31, 2013, 10:03:20 pm »
Just curious, is there only one mapper type in the master system cartridges or is it like NES where you'd half to emulate a billion of them?

If it's the former, you can probably still use a basic ROM emulator with some additional hardware as others have suggested.  Just a thought, it's your baby :-)
To be responsible, but never to let fear stop the imagination.
 

Offline pyroespTopic starter

  • Regular Contributor
  • *
  • Posts: 180
  • Country: be
    • Nicolas Electronics
Re: Searching a microcontroller
« Reply #23 on: March 31, 2013, 11:20:33 pm »
Just curious, is there only one mapper type in the master system cartridges or is it like NES where you'd half to emulate a billion of them?

If it's the former, you can probably still use a basic ROM emulator with some additional hardware as others have suggested.  Just a thought, it's your baby :-)
I don't know about the NES, but they are a couple of them that I know of. There are ROMs with integrated mappers. They pretty much all work the same.

My idea exactly. Even a really fast microcontroller won't be able to keep up with an address/data bus. The best option is a CPLD. Using standard logic chips is feasible but there may be issues with timing. Using 3.3V logic with 5V tolerance isn't a problem. For TTL anything over 1.4V is regarded as '1' and anything below 0.8V a '0'.
I'm not into CPLD, nor FPGA.
Maybe you can give me a couple of links for CPLDs, programmers, anything that could help me start with CPLDs.

I have worked with a GAL22V10 or something like that, like 2 or 3 years ago in university, and I must say I hated the "programming language", if you can call that a programming language  :palm: ...

Thanks for all your help !
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 30367
  • Country: nl
    • NCT Developments
Re: Searching a microcontroller
« Reply #24 on: April 01, 2013, 08:24:28 am »
I think a CPLD like the XC9500XL series from Xilinx would be a good option (specifically the XC9572XL). These are 3.3V though with 5V tolerant I/O. IIRC there are also 5V versions but these are twice as expensive. I always use the VHDL language to program these but that is because I know VHDL.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

- - -
-->