Author Topic: Pic mcu alternatives???  (Read 41180 times)

0 Members and 1 Guest are viewing this topic.

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Pic mcu alternatives???
« Reply #125 on: June 27, 2017, 01:07:08 pm »
A pic32MZ can be about as cheap as that stm and run up to 250 MHz! Even faster.

At Digikey the cheapest PIC32MZ costs EUR 7.21. But it runs at 200 MHz, and has even 64 bit floating point hardware, that's nice.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: Pic mcu alternatives???
« Reply #126 on: June 27, 2017, 02:04:33 pm »

It's just pain to use those Allwinner or Broadcom processors. External RAM, etc... You can't run them bare metal. I am all the way of using simple ARM F-series where possible.
You can run ANY processor bare metal. It's just aboiut how much work you need to do to configure it, and what tools are available to help.
 If there is a Linux BSP, you should be able to extract the needed initialisation code from that.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Pic mcu alternatives???
« Reply #127 on: June 27, 2017, 02:19:32 pm »
If you use a Zynq, probably with Linux, or a Raspberry Pi with Linux, it can be more difficult to implement hard realtime or low latency applications. With a microcontroller it is easier to program more low-level.

Quite opposite. With Linux or not, Zynq will be much better at "hard realtime" than any MCU. Zynq's real-time is measured in picoseconds.

BTW: dsPIC is also better at real-time than similarly sized ARMs because it doesn't use cache or any time-disturbing technologies. For example, background DMA operations don't disturb CPU timing. Everything is 100% predictable - exactly what you want for better real-time.
 

Offline Scrts

  • Frequent Contributor
  • **
  • Posts: 797
  • Country: lt
Re: Pic mcu alternatives???
« Reply #128 on: June 27, 2017, 02:49:19 pm »

It's just pain to use those Allwinner or Broadcom processors. External RAM, etc... You can't run them bare metal. I am all the way of using simple ARM F-series where possible.
You can run ANY processor bare metal. It's just aboiut how much work you need to do to configure it, and what tools are available to help.
 If there is a Linux BSP, you should be able to extract the needed initialisation code from that.

You can. Did you try that? Never seen a sane man doing this. I see people proposing those Allwinner chips like it would be easy to write some sort of general-purpose applications on them, but the problem that it isn't. People never tried to do some simple stuff like reading ADC values or using interrupts and still propose the same stuff.
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 26755
  • Country: nl
    • NCT Developments
Re: Pic mcu alternatives???
« Reply #129 on: June 27, 2017, 03:03:57 pm »
If you use a Zynq, probably with Linux, or a Raspberry Pi with Linux, it can be more difficult to implement hard realtime or low latency applications. With a microcontroller it is easier to program more low-level.

Quite opposite. With Linux or not, Zynq will be much better at "hard realtime" than any MCU. Zynq's real-time is measured in picoseconds.
Not if you run the realtime process from software. Besides that many microcontrollers have DMA which gets you hardware defined realtime performance for reading/writing data to peripherals. And let's not forget PWM peripherals which can deal with overcurrent protection in hardware.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Pic mcu alternatives???
« Reply #130 on: June 27, 2017, 03:23:42 pm »
Quite opposite. With Linux or not, Zynq will be much better at "hard realtime" than any MCU. Zynq's real-time is measured in picoseconds.

Not if you run the realtime process from software.

To get the best real-time performance you run your processes in PL and control them from PS. But, of course, you're right - incompetent use can reduce any MCU to a piece of junk.
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13695
  • Country: gb
    • Mike's Electric Stuff
Re: Pic mcu alternatives???
« Reply #131 on: June 27, 2017, 03:41:36 pm »

It's just pain to use those Allwinner or Broadcom processors. External RAM, etc... You can't run them bare metal. I am all the way of using simple ARM F-series where possible.
You can run ANY processor bare metal. It's just aboiut how much work you need to do to configure it, and what tools are available to help.
 If there is a Linux BSP, you should be able to extract the needed initialisation code from that.

You can. Did you try that? Never seen a sane man doing this. I see people proposing those Allwinner chips like it would be easy to write some sort of general-purpose applications on them, but the problem that it isn't. People never tried to do some simple stuff like reading ADC values or using interrupts and still propose the same stuff.
Is that just down to poor documentation though? or non-sensible default register values?
Just observing that nobody does it doesn't mean it's any harder than any other processor unless you can cite some specific reasons.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: Pic mcu alternatives???
« Reply #132 on: June 27, 2017, 03:50:23 pm »
A pic32MZ can be about as cheap as that stm and run up to 250 MHz! Even faster.

At Digikey the cheapest PIC32MZ costs EUR 7.21. But it runs at 200 MHz, and has even 64 bit floating point hardware, that's nice.
And simd instructions
I think M7 is a better comparison
 

Online alm

  • Super Contributor
  • ***
  • Posts: 2840
  • Country: 00
Re: Pic mcu alternatives???
« Reply #133 on: June 27, 2017, 04:26:41 pm »
Is that just down to poor documentation though? or non-sensible default register values?
Just observing that nobody does it doesn't mean it's any harder than any other processor unless you can cite some specific reasons.
Not sure about the AllWinner, but I believe Broadcom is very reluctant to give you a full datasheet unless you are a large volume customer. No publicly available datasheets beyond basic pinout information last time I checked (which admittedly was a couple of years ago). Of course you could try to reverse-engineer it from the Linux code.

Offline FrankBuss

  • Supporter
  • ****
  • Posts: 2365
  • Country: de
    • Frank Buss
Re: Pic mcu alternatives???
« Reply #134 on: June 27, 2017, 04:37:19 pm »
Not sure about the AllWinner, but I believe Broadcom is very reluctant to give you a full datasheet unless you are a large volume customer. No publicly available datasheets beyond basic pinout information last time I checked (which admittedly was a couple of years ago). Of course you could try to reverse-engineer it from the Linux code.

They provide a lot more information (but not all)

https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf

Even the GPU (VideoCore) is now public:

https://docs.broadcom.com/docs/12358545

Would be nice if now someone implements OpenCL for it.
So Long, and Thanks for All the Fish
Electronics, hiking, retro-computing, electronic music etc.: https://www.youtube.com/c/FrankBussProgrammer
 

Online alm

  • Super Contributor
  • ***
  • Posts: 2840
  • Country: 00
Re: Pic mcu alternatives???
« Reply #135 on: June 27, 2017, 05:03:46 pm »
That is a lot better than it used to be, but still seems not enough to create start-up code on bare metal. For example, I see nothing about setting up clocks, interrupt vectors, memory etc.

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Pic mcu alternatives???
« Reply #136 on: June 28, 2017, 02:02:32 am »
That is a lot better than it used to be, but still seems not enough to create start-up code on bare metal. For example, I see nothing about setting up clocks, interrupt vectors, memory etc.
Broadcom just assumes you will be using the Raspberry Pi hardware which comes in those startup code already programmed in the internal mask ROM. For the Pi the SD card is not loaded until the DRAM and clocks are already up.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4196
  • Country: us
Re: Pic mcu alternatives???
« Reply #137 on: June 30, 2017, 08:56:36 am »
Quote
You can run ANY processor bare metal.
Some chips have their really low-level initialization details obscured in confidential/NDA documents.   Notably Intel CPUs.  I think there's a "BIOS Implementors Guide" that is red-cover-difficult to get your hands on.  (IIRC, "Red cover" means customers can only look at it when "escorted" by an Intel Rep.   There are Orange (You can have this if you promise to keep it under lock and key) and Yellow cover (you can have this but don't give it to anyone else.)  (I had access to some Yellow-cover documents at one point.  They really didn't seem to contain stuff that should have been subject to that level of protection.  (Perhaps they were pre-release?))

Of course, you can get pretty CLOSE to bare-metal programming using someone else's BIOS.
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #138 on: June 30, 2017, 02:14:15 pm »
Test it!

It dont works, bah, no huge sinus table for the DSPIC.
aliexpress parachute
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: Pic mcu alternatives???
« Reply #139 on: June 30, 2017, 02:59:17 pm »
told ya.
granted, it can be done but there are more intelligent ways, like fitting the table in RAM with fewer points and interpolating between them.
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Pic mcu alternatives???
« Reply #140 on: June 30, 2017, 05:09:28 pm »
Test it!

It dont works, bah, no huge sinus table for the DSPIC.
How fast does it need to be? Maybe you can use an external ROM chip for the big LUTs, especially if your processor supports accessing SPI Flash using the normal address space.
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: Pic mcu alternatives???
« Reply #141 on: July 01, 2017, 07:01:51 am »
i wouldn't.
at some point there is little gain in thd/aliasing between full 16bit 64k entry and fewer entries interpolated between them (even linearly)
especially if you have a big number of those sinewaves to be mixed together and you use fixed point math. dspic doesn't have hardware floating point, but 40bit (9Q31) fixed point.

let's say you don't do a full manual, "only" 64 sines total, 44 key keyboard.
you really need 64 phase accumulators with sligthly different tunings per octave or you end up with standing waves if you cheat and only use 12

each drawbar has to mix up to 44 sines and then you have to mix the (up to) 9 drawbars together

It's impressive if you manage to pull it off :) but i don't see it happening if you have to fetch randomly from flash each time (5 intructions cycles, plus the preparing) or from external memory

perhaps he has a different approach to this problem but this is how you'd have to do it with a single processor :)

just saying, HOAX: Hammond On A Xilinx (FPGA) :)
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #142 on: July 01, 2017, 04:33:40 pm »
How fast does it need to be? Maybe you can use an external ROM chip for the big LUTs, especially if your processor supports accessing SPI Flash using the normal address space.

Thank you Technix, i was been thinking about that also,
thing is i need to get started with testing SPI someday, and i need a EPROM burner.
Good advice.
aliexpress parachute
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #143 on: July 01, 2017, 04:36:33 pm »
this is how you'd have to do it with a single processor :)

Yes, i really hope Microchip would release a modern version of this chip with stereo audio DAC, the DSPICFJ128GP802 is very old already.
I get currently 4 notes of polyphony, with 8 drawbars + autopan @ 44K1Hz.
With all tone-wheels derived from 2 base oscillators per voice.
aliexpress parachute
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3137
  • Country: ca
Re: Pic mcu alternatives???
« Reply #144 on: July 01, 2017, 04:45:56 pm »
Yes, i really hope Microchip would release a modern version of this chip with stereo audio DAC, the DSPICFJ128GP802 is very old already.

I think newer ones come with I2S instead of DAC - dsPIC33EPxxxxx8xx, assuming you would use I2S capable digital amplifier instead of analog one. World is changing from analog to digital :)
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #145 on: July 01, 2017, 04:51:56 pm »
at some point there is little gain in thd/aliasing between full 16bit 64k entry and fewer entries interpolated between them (even linearly)

For the Hammond clone ok, i also like to do more things with this sine LUT.
I like to generate harmonics to create a saw, triangle or square waveform.

something like this :
Code: [Select]
long out;
out = sinus[ phase & MAX ]; // base partial

phase *= 2;
out += sinus[ phase & MAX ] / 2; // second harmonic

phase *= 3;
out += sinus[ phase & MAX ] / 3; // third harmonic

and so on until the Nyquist frequency is reached ( half the samplerate ).

out /= 2;
[\code]
aliexpress parachute
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #146 on: July 01, 2017, 04:53:32 pm »
I think newer ones come with I2S instead of DAC - dsPIC33EPxxxxx8xx, assuming you would use I2S capable digital amplifier instead of analog one. World is changing from analog to digital :)

I have a analog recording studio mixing table, i dont wanto buy extra expensive digital parts,
once i get going with SPI i will try SDM DAC with converter socket, only those DACS are more expensive then the complete chip with build in DAC together.
« Last Edit: July 01, 2017, 04:55:43 pm by JanJansen »
aliexpress parachute
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3452
  • Country: it
Re: Pic mcu alternatives???
« Reply #147 on: July 02, 2017, 08:33:02 am »
this is how you'd have to do it with a single processor :)

Yes, i really hope Microchip would release a modern version of this chip with stereo audio DAC, the DSPICFJ128GP802 is very old already.
I get currently 4 notes of polyphony, with 8 drawbars + autopan @ 44K1Hz.
With all tone-wheels derived from 2 base oscillators per voice.

nice :)

You pic has DMA and probably also SPI in framed mode.. I read somewhere that it could mimick I2S in left/right mode

i feel you on this dspic is old i wish it would be updated... i'm in the very same situation but with another dspic with another specialty peripheral :(

i hope microchip isn't planning to stop the 16 bit line, it's the one i use the most both at work and at home.. Local microchip rep assure me they won't be made obsolete but still..

anyway they _are_ releasing new chips, GS series is a beast for digital SMPS controller and they just put out a digital SMPS controller which has a very simillar pinout and peripherals ;) (i suspect this dspic with a mask rom)

may i suggest you upgrade this dspic to a 33EP part? even though you gain one cycle latency for RAM, 2 for ROM and jumps.. core can run at 70 MIPS. This, with some new instructions optimized for loop and DSP instruction that do dual data fetch you could probably gain a few more vouces :)
 

Offline technix

  • Super Contributor
  • ***
  • Posts: 3507
  • Country: cn
  • From Shanghai With Love
    • My Untitled Blog
Re: Pic mcu alternatives???
« Reply #148 on: July 02, 2017, 03:20:35 pm »
this is how you'd have to do it with a single processor :)

Yes, i really hope Microchip would release a modern version of this chip with stereo audio DAC, the DSPICFJ128GP802 is very old already.
I get currently 4 notes of polyphony, with 8 drawbars + autopan @ 44K1Hz.
With all tone-wheels derived from 2 base oscillators per voice.

nice :)

You pic has DMA and probably also SPI in framed mode.. I read somewhere that it could mimick I2S in left/right mode

i feel you on this dspic is old i wish it would be updated... i'm in the very same situation but with another dspic with another specialty peripheral :(

i hope microchip isn't planning to stop the 16 bit line, it's the one i use the most both at work and at home.. Local microchip rep assure me they won't be made obsolete but still..

anyway they _are_ releasing new chips, GS series is a beast for digital SMPS controller and they just put out a digital SMPS controller which has a very simillar pinout and peripherals ;) (i suspect this dspic with a mask rom)

may i suggest you upgrade this dspic to a 33EP part? even though you gain one cycle latency for RAM, 2 for ROM and jumps.. core can run at 70 MIPS. This, with some new instructions optimized for loop and DSP instruction that do dual data fetch you could probably gain a few more vouces :)
I am not familiar with the PICs, but if you are switching MCUs you can try have a look into the STM32F4 series - like STM32F405RGT6. That chip have native I2S, FPU, 168MHz operation and 1MB built-in Flash. If 1MB is not enough for your LUT you can step up to STM32F427VIT6 (2MB Flash) or STM32F429ZGT6 (1MB Flash, bigger package to allow the use of an external SDRAM chip.)

With SDRAM added to the chip you don't need a lot of Flash space any more - you can program just a bootloader into the 1MB Flash, that initializes the SDRAM and uncompresses (or copies) the actual application code with LUT from external SPI Flash into SDRAM. The STM32F429ZGT6 chip supports 2 sets of 4-bank 13-bit address 16-bit data SDRAM chips - that makes up to 1GB of SDRAM space.
 

Offline JanJansen

  • Frequent Contributor
  • **
  • Posts: 380
  • Country: nl
Re: Pic mcu alternatives???
« Reply #149 on: July 02, 2017, 03:39:23 pm »
I only use DIP packages, this one has build in audio DAC for around €5, other chips need DAC that is more expensive.
aliexpress parachute
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf