Author Topic: Choosing a MCU  (Read 4327 times)

0 Members and 1 Guest are viewing this topic.

Offline SpacedCowboy

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: gb
  • Aging physicist
Re: Choosing a MCU
« Reply #25 on: April 25, 2022, 04:23:31 pm »
Personally, I have never used any MPU with built-in I2C

Wait, really ?

I'm not sure I've ever come across an MCU that *doesn't* have I2C in hardware - even 8-bit AVR's had that IIRC. I mean it's sometimes called 'TWI' to get around licensing, or you might have an 'SIO' module that can be configured for I2C, SPI, UART etc. But I don't think I've ever come across something that doesn't have it at all.

I'm curious now - which MCU's were you using. There could be a fantastic undiscovered country out there, for all I know :)
 
The following users thanked this post: tooki

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Choosing a MCU
« Reply #26 on: April 25, 2022, 04:30:05 pm »
How is that possible?  >:D A local hardware I2C interface makes life a lot easier. Some microcontrollers even have 2 or more and SoCs have many (6 or more isn't unheard of).

Dunno, but - thinking about what I usually use
- m683xx, has 1xSPI line, no-i2c -> i2c is implemented by two TPU-pins for bit-banging
- m68hc11 has 1xSPI line, no-i2c -> i2c is implemented by two PORT-pins for bits-banging
- the Ath5k (Linux/MIPS SoC) used in Fonera2 has 1xSPI line, no-i2c, -> i2c by SPI-I2C bridge
- the Ath9k (Linux/MIPS SoC) used in the RSP has 1xSPI line, no-i2c, -> i2c by SPI-I2C bridge
- the Ath9k (Linux/MIPS SoC) used in the WL703 has 1xSPI line, no-i2c, -> i2c by SPI-I2C bridge
- my fpga SoftCore uses 3 digital pins to implement SPI -> i2c is implemented by SPI-I2C bridge

I think ... I am using weird things  :-//
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Choosing a MCU
« Reply #27 on: April 25, 2022, 04:46:27 pm »
(
OK, it probably doesn't count, but ... even my calculators don't have it  :'( :'( :'(

my TI89 and TI92 have a SIO module used by TI for the TI-link port. Those things before USB we used to upload and download files over an RS232 serial link.

The TI-link cable is a TTL3.3V to RS232 adapter, while inside the graphing calculator there is basically a UART module combined with a GPIO, and you can configure the two pins of the Ti-link port as  {uart.RX, uart.TX} or as {GPIO0, GPIO1}

On my TI92 there is also an SPI link inside the calculator, but it is not exported outside the motherboard, so on both of them the I2C functionality(1) is implemented on my graphing calculator by bit-banging two GPIO pins

(1) is useful for directly interfacing MEMS accelerometers, gyroscopes, and magnetometers, and acquiring data for later processing
)
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline Bassman59

  • Super Contributor
  • ***
  • Posts: 2501
  • Country: us
  • Yes, I do this for a living
Re: Choosing a MCU
« Reply #28 on: April 25, 2022, 05:09:54 pm »
Personally, I have never used any MPU with built-in I2C

Wait, really ?

I'm not sure I've ever come across an MCU that *doesn't* have I2C in hardware - even 8-bit AVR's had that IIRC. I mean it's sometimes called 'TWI' to get around licensing, or you might have an 'SIO' module that can be configured for I2C, SPI, UART etc. But I don't think I've ever come across something that doesn't have it at all.

I'm curious now - which MCU's were you using. There could be a fantastic undiscovered country out there, for all I know :)

I thought the same thing until I noticed they wrote "MPU" and not "MCU."
 
The following users thanked this post: SpacedCowboy

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Choosing a MCU
« Reply #29 on: April 25, 2022, 05:22:59 pm »
This. DiTBho talked about "MPUs". (Not that it was fully on-topic, since the OP  asked for MCUs.)
And since I noticed  DiTBho tended to talk about rather "vintage" stuff, I'm assuming they are also refering to somewhat oldish MPUs, which indeed rarely had any I2C interface.

Still, a number of them have some kind of SMBus interface, which is very close to I2C.

But certainly, if you're talking about any Z80/68k/8088/86 or derivatives, I2C will be hard to find.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Choosing a MCU
« Reply #30 on: April 25, 2022, 05:44:49 pm »
I mean it's sometimes called 'TWI'

out of curiosity I checked among the laboratory equipment and with the name TWI there is a module that has it: the ADSP-BF537 module :D

The chip has a built-in I2C! WOW! Unfortunately the SDA and SCL pins are routed to any connectors on the final board, but it's good to know!

(irony, CAN an Ethernet are both in use  :o )
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline SpacedCowboy

  • Frequent Contributor
  • **
  • Posts: 292
  • Country: gb
  • Aging physicist
Re: Choosing a MCU
« Reply #31 on: April 25, 2022, 06:03:08 pm »
I missed the MPU/MCU difference - though a lot of more-modern MPU's also have i2c.

You mentioned an FPGA soc with SPI on it - SPI is one of the most trivial interfaces for an FPGA to provide, so that makes some sense, but it reminded me of a meeting I had with the FPGA folks on a project a few years back. They had a task of interfacing a whole bunch of custom hardware to a computer, and a lot of it was repeated modules, to be used one per DUT. They just duplicated everything for each module, so I ended up with 48 i2c busses per FPGA... That burnt a fair amount of PCI BAR space.... :)
 

Online SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Choosing a MCU
« Reply #32 on: April 25, 2022, 06:17:31 pm »
And speaking of FPGAs, a number of them, even without any hard or soft core, have embedded hardware SPI and I2C modules (often qualified 'hardened') that you can use in your designs. For instance Lattice parts.
 

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Choosing a MCU
« Reply #33 on: April 25, 2022, 06:37:13 pm »
FPGA with open-collector pins?  :o :o :o
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26907
  • Country: nl
    • NCT Developments
Re: Choosing a MCU
« Reply #34 on: April 25, 2022, 08:00:50 pm »
FPGA with open-collector pins?  :o :o :o
That is very easy to emulate: disable the output when the lines needs to be pulled-up. Oldest trick in the book; bit-banged I2C does the same.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: DiTBho

Offline DiTBho

  • Super Contributor
  • ***
  • Posts: 3915
  • Country: gb
Re: Choosing a MCU
« Reply #35 on: April 25, 2022, 08:52:46 pm »
Ah, ok, so it's the same trick I'm using.
The opposite of courage is not cowardice, it is conformity. Even a dead fish can go with the flow
 

Offline Simon

  • Global Moderator
  • *****
  • Posts: 17816
  • Country: gb
  • Did that just blow up? No? might work after all !!
    • Simon's Electronics
Re: Choosing a MCU
« Reply #36 on: May 07, 2022, 09:15:45 pm »
For a personnal project, I now have this opportunity and I don't really now how to choose a processor.

It's easier than ever: you buy what is available. Now you have maybe 1% of the choice you used to.

It won't get any better at least in a year or so.



Spot on, I picked a part for work, not STM as they are less available than rocking horse shit, but I was willing to use anything I could get as it was a fresh start with my first ARM chip, a new job and several relatively simple products to develop in low volumes.
 

Offline HawakaTopic starter

  • Regular Contributor
  • *
  • Posts: 97
  • Country: ch
Re: Choosing a MCU
« Reply #37 on: May 17, 2022, 04:56:54 pm »
Hi All,

Thanks for all the suggestion. I went with a LPC55S69JBD100. Probably a bit oversize for what I want to do, but the Powerquad feature looks really interesting.

Also I found it on a very cheap dev board on OKdo and bought 2 directly. Get what you can was the best advise for sure.

https://www.okdo.com/us/p/okdo-e1-development-board/


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf