Pic mcu alternatives??? - Page 1
Forum section: electronics / general

author: kgavionics
author_rank: Regular Contributor
timestamp: June 18, 2017, 09:59:38 pm
content: Hi guysA few years ago i started using micro-controller ( microchip 16F and 18f family).i was using only assembly language to program them.I haven't had any problem.I wanted to start using C, because as you may know assembly is a lot of time consuming.I started searching for the descent compiler and it turned out that i have to spend a lot of money to get one like the xc8, of course they offer a shitty free version which inserts a useless code just to make your code bigger.No sorry, i hate that idea specially for a guy how's coming from assembly language.I think that my love story with microchip mcu is about to end,because of the lack of a descent C free compiler.my question which is the best microcontroller ( it doesn't matter if it's 8bit or 32 bit) that can offer a descent free C compiler to build some project?Note:I don't like to use arduino family,because i want to understand and have control of the registers.thanks in advance

author: NorthGuy
author_rank: Super Contributor
timestamp: June 18, 2017, 10:22:12 pm
content: Free XC8 is Ok. They used to put in a lot of bloat, but now they don't.Most MCUs will have some sort of free C compiler, so you can choose practically anything. However, you will have to change your attitude - C will not be as efficient as assembler, so you will have to learn to live with that and not worry about the disassembly too much.

author: ataradov
author_rank: Super Contributor
timestamp: June 18, 2017, 10:39:46 pm
content: Any ARM chip you like. Seriously, there is no more supported architecture than ARM (excluding X86, of course).

author: NorthGuy
author_rank: Super Contributor
timestamp: June 19, 2017, 12:04:06 am
content: Quote from: blueskull on June 18, 2017, 11:01:02 pmI don't think XC8 is open source. It is based on old Hi-Tech C. XC16 and XC32 are based on GCC, so the source is open.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: June 19, 2017, 12:14:43 am
content: STM32, i stopped using microchip in my projects 4 years ago.

author: technix
author_rank: Super Contributor
timestamp: June 19, 2017, 12:34:53 am
content: Quote from: kgavionics on June 18, 2017, 09:59:38 pmGCC and LLVM/clang are the two best free (both as in beer and as in speech) compilers out there. For 8-bit processors there is also the SDCC.You can use AVR without the Arduino libraries. You will still be using the AVR-GCC toolchain though. There is an experimental fork of LLVM that emits AVR code.The ARM architecture is supported by both GCC and LLVM/clang (yes that includes the copy of Apple clang that comes with Xcode.)From Microchip both xc16 and xc32 for PIC24/dsPIC (xc16) and PIC32 (xc32) are actually paid versions of GCC. You can find the corresponding source code (released under GPL,) patch out the license checking code, and for xc16 patch in C++ support (if you need it.) Normal MIPS32 GCC may also work for PIC32.There is this Intel Quark D2000 that runs x86 and thus supported by GCC and LLVM/clang.For SDCC, its strength is the 8051 and Z80 architectures. It do have experimental support for 8-bit

author: kgavionics
author_rank: Regular Contributor
timestamp: June 19, 2017, 03:22:24 am
content: thank you guys for your help.sorry, i was a little bit frustrated, after I've done a bit of research it seems that the xc8 free version is not as bad as i thought.for now i'll keep using PIC, but i might be interested for something else in the near future.

author: hans
author_rank: Super Contributor
timestamp: June 19, 2017, 09:14:56 am
content: Quote from: blueskull on June 19, 2017, 12:11:28 amStill though, you're right. You don't have to look far to get XC8 'refactored'.Does it make a big difference? No not really. Don't expect wonders. The most I usually got was 10% code size reduction. The best code size optimisations were put into free editions years ago, because before that it was appalling beyond belief.Nevertheless I don't touch XC8 anymore because of lack of C99 (and C++) support. The compiler technology really starts to show it's age, so do the chips.But if someone is keen to using these PICs, power to them. It are still fun chips that can run code, have easy to program peripherals, etc. I would recommended XC8 over programming assembly. Maybe assembly can be a few % more efficient here and there.. but the cost of programming it, error prone, debug factor etc. all don't make sense.As a side note: I'm impressed with the assembler outputs of e.g. the GCCs compiler puts out, even for heavily templated code with inheritance (but no virtual functions!) and composition structures in C++.

author: westfw
author_rank: Super Contributor
timestamp: June 19, 2017, 09:16:58 am
content: There are also a number of other commercial C compilers for PIC that are more reasonably priced than XC8.

author: hamdi.tn
author_rank: Frequent Contributor
timestamp: June 19, 2017, 09:26:07 am
content: Quote from: kgavionics on June 19, 2017, 03:22:24 ami can't remember if it was free XC8 or free H-TECH Compiler that add more unnecessary code to the compiled file just so they can say buy PRO version to optimize your code size. One more reason to give up Microchip.

author: tszaboo
author_rank: Super Contributor
timestamp: June 19, 2017, 09:28:57 am
content: I'm just waiting for someone to ctrl+c ctrl+v here their Holy Wall Of Text of the PSOC, how it is superior to everything. BTW it's not.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: June 19, 2017, 10:49:39 am
content: Quote from: kgavionics on June 19, 2017, 03:22:24 amThe really obvious next step is Arduino. Uno or Mini clones on the slow boat from China (I personally like NHduino) cost almost nothing. Or a 2560 clone if you want more pins and hardware. You can then use the Arduino IDE and program C to your hearts content. (ASM is also possible)An advantage of sticking with MPLABX and XC8 is the potential to hardware debug which may or not be useful.

author: spudboy488
author_rank: Regular Contributor
timestamp: June 19, 2017, 11:25:32 am
content: Quote from: hamdi.tn on June 19, 2017, 09:26:07 amI don't think it actually added code, it just didn't run some of the optimization passes to remove unnecessary code. I believe the free and pro compilers will produce the same code if you turn off some of the optimization in the pro version. There were no optimization option in the free version.

author: VEGETA
author_rank: Super Contributor
timestamp: June 19, 2017, 11:40:54 am
content: Quote from: NivagSwerdna on June 19, 2017, 10:49:39 amI differ with you. Arduino should be the very first step in learning mcus, then you dig into PIC and other vendors. For our post, Arduino is worse than PIC since it adds yet another layer which will make code less efficient.My own opinion is that XC8 is just great, greater than many other free stuff. It is usable, official and supported. Code efficiency is not a fundamental issue in my opinion because it is because of wrong MCU choice most of the times. If you have a big project, get a big enough MCU. Don't get a tiny 8-bit PIC then claim your awesome robot project failed because compiler is bad (This is in general, not personal to the OP)... right? I remember an EEVBlog post talking about this.Microchip PIC is one of the best, I don't think you should use another vendor unless you want to use ARM MCUs. ARM 32-bit MCU are obviously better and more powerful.

author: NivagSwerdna
author_rank: Super Contributor
timestamp: June 19, 2017, 03:38:38 pm
content: Quote from: VEGETA on June 19, 2017, 11:40:54 amIt's true that Wiring gets in the way but you can avoid it very easily and get straight to bare metal. Put your code, in a while(true) inside the loop function, redefine or disable timer0 and you are good to go with bit twiddling the registers.Depends on what you actually want to achieve.

author: technix
author_rank: Super Contributor
timestamp: June 19, 2017, 03:47:39 pm
content: Quote from: NivagSwerdna on June 19, 2017, 03:38:38 pmYou can install Arduino software just to use it as an installer for AVR-GCC and AVR-libc. Then you can safely skip the Arduino IDE itself and use the copy of toolchain it packed for your own project.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 19, 2017, 04:05:10 pm
content: Quote from: technix on June 19, 2017, 03:47:39 pm"But I was thinking of a planTo dye one's whiskers green,And always use so large a fanThat they could not be seen".Lewis Carroll. Through the Looking-Glass.

author: technix
author_rank: Super Contributor
timestamp: June 19, 2017, 04:11:21 pm
content: Quote from: NorthGuy on June 19, 2017, 04:05:10 pmThere are some tricky-to-get-right toolchains that Arduino folks support, like the ones for Intel Quark line. Using the copy installed by Arduino is often more reliable than installing it yourself.

author: FrankBuss
author_rank: Unknown
timestamp: June 19, 2017, 04:17:00 pm
content: I would recommend that you start with an Arduino. There are Arduino Nano clones for less than $2, free shipping on eBay, with USB serial port integrated and they are faster than the usual PIC16/18, even when programmed in C. But if you want, you can actually use the underlying registers with it, no need to use the Arduino API. I use it frequently when I test things like new displays, sensors etc., or even for bigger projects, like this "bateye" hardware which I wrote for someone on Hackaday:https://github.com/DebarghaG/Project_Basics/blob/master/bateye-stereo.inoIt uses two ultrasonic distance sensors and creates two audio signals, depending on the distance, logarithmically scaled (bigger frequency steps with higher frequencies, because the ear perceives this as linear then). I had to configure the Atmel registers myself for the interrupt, because this is not possible with the standard API (but there is a timer1 module for it, as I just found out), but the rest is really easy with it.When I need more power, currently I use one of the STM32 microcontrollers. The CubeMX GUI makes it very easy to configure all peripherals, you really don't want to do this by hand. The code looks horribly bloated, but it has big enough flash memory, so I don't care, and they improve it all the time, it has fewer and fewer bugs with every versionI use it in combination with the Keil uVision IDE (free for up to 32 kB).Some bigger STM32 chips run with 168 MHz (costs like $10), the smaller ones with 48 MHz (for like $5). But it is still simple enough with one supply voltage and internal oscillator, so you can use a breakout board and start playing with it (with a ST-Link programmer, which is again cheap on eBay). I used this to test a new 3-color e-paper display:https://hackaday.io/project/20466-wifi-epaper/log/61762-stm32l433-and-new-display-testLater I created a proper board, which is currently manufactured:https://hackaday.io/project/20466-wifi-epaper/log/61807-test-board-for-bluetooth

author: westfw
author_rank: Super Contributor
timestamp: June 19, 2017, 08:32:06 pm
content: QuoteBy all means, try it out. Especially since you know the assembly language, you're in a good position to evaluate the code produced by the compiler.When Microchip acquired HiTech and released an 8-bit PIC compiler "free version with no optimization", it was pretty awful. People were expecting the equivalent of what gcc produces with "-O0", unaware of just how much optimization goes on in a compiler in between the sort of "parsed source naively translated to machine code" and "no fancy optimizations." They got the former. It was particularly bad on the PIC architecture, since that's pretty distant from the PDP/11 that C "naturally" maps to.Since that time, they have reportedly fiddled with the settings, and it's gotten better.

author: danadak
author_rank: Super Contributor
timestamp: June 19, 2017, 11:37:20 pm
content: Some questions -1) Type of designs you are doing ? What is processor doing in the designs ?2) You dealing with analog, filters, ADC ?3) Type of outputs you are driving, simple digital, PWM, DAC, motors, other digital....4) Displays/interface to UP being used in finished product ?Regards, Dana.

author: ebclr
author_rank: Super Contributor
timestamp: June 20, 2017, 02:49:37 pm
content: The sure onehttp://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 03:09:07 pm
content: Quote from: NANDBlog on June 19, 2017, 09:28:57 amI think it have arrived. Well a shorter version arrived, with a link to a MUCH longer one.

author: ebclr
author_rank: Super Contributor
timestamp: June 20, 2017, 04:01:57 pm
content: Psoc is for sure, It's unique, If you don't believe is because you didn't play with psoc rIt's a mix of FPGA, arm and even a "kind of analog" litle FPGAOnly as a little information Check this video and tell me, what another arm processor ( or any other one ) make so easy to add small functions based on Veriloghttp://youtu.be/XpgmKk-COkAAlso, check this 2nd video and tell me do you know any other processor that you can make small analog circuits on the fly?Psoc is the most flexible system family available nothing like that, and if you evaluate the full family, you will agree.,The problem with Psoc is that is something that is a new and Innovative, you will need some effort to learn and understand because breaks your previous experience with microprocessor, PSOC is a System on Chip not a microprocessor

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 04:23:53 pm
content: Quote from: ebclr on June 20, 2017, 04:01:57 pmNo thanks. If the microcontroller don't have tools for Linux or macOS it is literally dead end for me.Do not persuade me to install Windows somewhere. I don't even own Windows. All my computers runs either Ubuntu Linux or macOS. And none of my surviving computers are bought with Windows licenses included - either I built it up myself from parts, or I bought a Mac.

author: ebclr
author_rank: Super Contributor
timestamp: June 20, 2017, 04:31:56 pm
content: OK, keep on your 8051 and gimp cave, and let the people that think out of the box do the job

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 04:40:07 pm
content: Quote from: ebclr on June 20, 2017, 04:31:56 pmBefore you start thinking out of the box check if your ass is being watched and your passwords are being sniffed by Microsoft and/or the Big Brother.This is from an ex-employee of Microsoft, that was a senior developer in Windows team from Windows XP to Windows 8.1.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 20, 2017, 04:46:26 pm
content: Quote from: ebclr on June 20, 2017, 04:01:57 pmPIC16F1764Not to mention that it would me much easier to use off-the-shelf op amp - nothing needs to be done, no programming required. And, most importantly, you can select the op amp with characteristics you really needs. Chances that a built-in op amp with arbitrary characteristics is exactly what you need are slim to none.

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 04:49:17 pm
content: Quote from: ebclr on June 20, 2017, 04:31:56 pmOh and speaking of 8051, I am not using it as my main microcontroller choice for the projects. I have a series of blog posts exploring 8051 and that's it. I have way more ARM and AVR based projects than 8051:https://github.com/ArduinoMax(Arduino stuff - mostly AVR)https://github.com/SushiBits(My own designs - almost exclusively ARM)

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 05:06:01 pm
content: Quote from: NorthGuy on June 20, 2017, 04:46:26 pmAlso since op amps almost always comes in the same pinout, socketed op amps are godsend. I used to have a small headphone amp with two socketed op amps. I started off using a pair of LM358s but as my demand of audio quality increases the op amps are swapped out for better ones - TL072, then NJM4559, then OPA2134. Should I be able to find it I may even try flirt with TLC2272 on this.Try upgrade an op amp in PSoC without respinning the entire board or change a significant portion of the code.

author: ebclr
author_rank: Super Contributor
timestamp: June 20, 2017, 05:16:35 pm
content: It's not only opamps, it's a full set of analog components, of course, you can't argue against because you never tried, and already makes clear that will never do that, because the tools isn't on your OS preference, let follow your course and pray for your eventual competitors don't take advantage of this wonderful piece of silicon (Psoc) against something you are planning to compete using Linux friendly tools

author: technix
author_rank: Super Contributor
timestamp: June 20, 2017, 11:56:30 pm
content: Quote from: ebclr on June 20, 2017, 05:16:35 pmThey won’t compete.At least in China nobody bothers using PSoC at all. It is way too expensive to be competitive in the market.You can check Aliexpress or Taobao for MCU dev kits. You would be hard pressed to find something with PSoC on it. OTOH kits based on STM32, STC 8051, Microchip PIC16 and AVR just floods the market. Also check the bookstores and college curriculums, there is virtually no book or course that even touches upon the advanced features of PSoC.The STM32 line is so popular we are now even seeing clones from China in the form of GD32 line.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 21, 2017, 12:14:34 am
content: You cannot judge by the price of the development kits. Manufacturers sell them below cost to attract buyers to their chips. Look at the prices of the chips themselves instead.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 12:14:57 am
content: Quote from: blueskull on June 21, 2017, 12:07:15 amPoint me to someone actually sells this at $10 in China. It is nigh difficult to find, at least for me, and costs way more than $10.And how much does the STM32 kits cost again? $15 for STM32F407ZGT6 + 1MiB external SRAM + 16MiB external Flash.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 12:26:18 am
content: Quote from: NorthGuy on June 21, 2017, 12:14:34 amI understands this for first-party kits. But third-party kits are entirely another story.Arduino *was* a third party kit until they attracted attention from Atmel. Since then they gained access to cheap chips and become a first-party kit.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 12:49:36 am
content: Quote from: blueskull on June 21, 2017, 12:26:34 amTo be honest I just bought one for the sake of trying out what you claim to be the “most flexible MCU ever” (I still doubt it.)CNY 80 is still a stiff price for an entry level dev kit. The third party STM32 kit I quoted above is one of the advanced product lines out there.

author: Unknown
author_rank: Unknown
timestamp: June 21, 2017, 02:51:33 am
content: Quote from: technix on June 20, 2017, 04:49:17 pmI think 8051 chips are great in many applications. Cheap, low power, available with good peripherals, and mature dev tools. Why should anyone need to feel bad for learning and using 8051s? Unlike some people, it doesn't sound like you're going around saying that the 8051 is the solution to every problem.This is what showed up in my mailbox the other day:From what little playing around with it I've done, EFM8 looks like it will add to the other chips I like: RL78, MSP430, STM32, STM8, AVR, XMOS, Z8, and just for fun, WDC 65xx. I am trying to make a conscious effort to rotate through those for each new design. I enjoy trying new things and constant learning. I think the PSoC looks great too. I'd give it a try for something with mixed signals or that needed a bit of extra programmable logic. I appreciate people like blueskull talking about the real world applications they use it for, and why, in a way that doesn't feel heavy handed. It does seem expensive. That's not always important.But honestly the whole PSoC fanboy thing is such a turnoff:Almost every thread where someone asks what uC to use there's basically a full spread Cypress advertisement within the first few pages"Do you breathe air? If so, the PSoC is the right microcontroller for you. But if you're into kicking puppies, it may not be the best choice."Why does PSoC being great always mean that they have to take a dump on someone else's choice of microcontroller? Just because their favorite product is good doesn't mean that everything else is bad. It also doesn't mean that it's the only obvious choice.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 03:58:51 am
content: Quote from: blueskull on June 21, 2017, 12:26:34 amFor $20 I can get the Allwinner V3s stack up, sample the analog signals directly and crunch through the entire PSoC analog chain using software code. Oh that is a Cortex-A7 core with full FPU and SIMD instructions.

author: rcbuck
author_rank: Frequent Contributor
timestamp: June 21, 2017, 04:04:15 am
content: I would like to see verified numbers of how many actual products PSOC parts are used in. My guess (I could be wrong) is that their cost keeps their market share of actual products very low compared to other ARM vendors products. If they are doing that great, why has their stock not gone up in 5 years?5 year ago price Today's closing priceMicrochip $33.20 80.35STMicroelectronics $5.56 15.11Cypress Semi $13.41 13.35

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 05:19:33 am
content: Quote from: blueskull on June 21, 2017, 04:10:44 amPSoC may come with all those features, but what if I don't need some features why would I still pay for it? Allwinner V3s is cheap enough for me to afford shopping around for even better external components to perform the same if not better. Same goes for STM32 or AVR or STC 8051. Try beat ADI or LT or TI or Maxim on analog. And I don't have to pay for features I don't use (unpopulated footprint at worst, removed from the board usually. As long as routing works and the board is not getting bigger adding a footprint to a PCB is free.)Quote from: blueskull on June 21, 2017, 04:10:44 amAllwinner V3s is automotive class silicon by default in the first place. Go ahead and read their marketing slides.Quote from: blueskull on June 21, 2017, 04:10:44 amAllwinner V3s also consumes milliamps, and can boot up in milliseconds, if the program is written for bare metal operation, just like STM32 or AVR or STC 8051, oh or like PSoC.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 05:32:12 am
content: Quote from: ebclr on June 20, 2017, 05:16:35 pmThere are way too many scenario PSoC won't work even on an electrical point of view. Take one of my constant current load design for an example: in order to use the cheaper 10V gate power MOSFETs I used a boost converter to provide the error amplifier 15V supply voltage. Try not to fry an PSoC op amp with 15V supply. If the PSoC have to be shoehorned I have to use the much more expensive logic level power MOSFETs (just check the price difference of IRF540N and IRL540N,) use a floating ground (a whole other can of worms by itself) and still need an external op amp to invert the sample point voltage.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 05:48:49 am
content: Quote from: blueskull on June 21, 2017, 05:41:18 amSo you are suggesting a good design have to be a complex one? For at least this specific project PSoC is definitely adding complexity and points of failure. In my board I even introduced a strict point of separation of programmed and hard wired analog circuitry for the sake of safety - a locked up program does not fry the analog section, and the thermal shutdown of the power MOSFET does not depend on working code. Can PSoC do this?Quote from: blueskull on June 21, 2017, 05:41:18 amThe kicker is not IRF540N/IRL540N, but the additional complexity just to accommodate the PSoC. A negative rail just for the single external op amp to flip the sense line voltage is ridiculous. Also it is much simpler to design a boost SMPS than inverting SMPS, as chips are readily available. No thanks I will stick to my cheap STM32F103C8T6 + TLC5615 + TLC2272 stack.Also, can PSoC receive OTA code updates without interrupting the analog side of things? I can leave the analog side of things on autopilot during OTA.

author: ebclr
author_rank: Super Contributor
timestamp: June 21, 2017, 06:02:47 am
content: Using PSoC you will save thousands of dollars on development, it's a system on a chip, smaller PCB's, more flexible and integrated solution, ideal for the middle of complex things on the very low scale of production, you can even use the development stick as a component of products.They are not made to compete with STM8 or STC8051 for 1 dollar Led VoltmeterThe main application is medical and military devices and measure and automation, where you want performance and system integration that only PSOC can give you, The learning curve is hard, but if you pass that learning phase you can make a full complex system in a day. The saving isn't on the chip, the saving in on engineer time, your product will be ready faster and the gain on development cost and time will pay the premium of the CPU.Psoc can read analog channels, filter at very high rates and generates a VGA signal showing the results, and having excellent capacitive buttons and sliders while at the same time generating one analog out in a range outside your power supply limits using an internal cap switch, and generating several different clocks to be used externally based on the PLLs you can define.Did you get it, it's unique

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 06:19:58 am
content: Quote from: blueskull on June 21, 2017, 05:59:10 amI need lower than GND. I am talking about -5V or so.Quote from: blueskull on June 21, 2017, 05:59:10 amIt is a sense signal. No way you can pump it.Quote from: blueskull on June 21, 2017, 05:59:10 amThe PSoC itself is more expensive than the whole board of components combined in the first place. So, moot point.I'd rather not shoehorn PSoC down every project at the cost of increased complexity and/or BOM cost. That is also the point why I am keeping the 8051 stack alive, as for the extreme simple and/or the extreme cheap 8051 just works without too much complexity. For example I may implement an I2C controlled single phase synchronous buck converter using ATtiny85 + MOSFETs, but for a simple LED blinky it is certainly STC15W101 + MOSFETs

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 06:36:38 am
content: Quote from: ebclr on June 21, 2017, 06:02:47 amSo I should prepare to spend the thousands of dollars saved in R&D in either repairing and servicing the devices, or paying dubious recyclers to handle the broken units?Quote from: ebclr on June 21, 2017, 06:02:47 amWhen I do get past the "learning phase" I will find myself cooking up designs that is easier to route, plan, debug and build using separate chips - like STM32 in the center and chips like ADC0832, TLC5615 and TLC2272 scattered around.Also I doubt if I can hook an oscilloscope probe into the intermediary signal to debug the circuits.Quote from: ebclr on June 21, 2017, 06:02:47 amSo does Allwinner V3s. Oh and V3s uses the much more common parallel RGB interface which can be ingested by a lot of LCD panels or bridged into things like HDMI or DisplayPort easily with a PHY chip, oh and vintage VGA too maybe using some vintage RAMDAC. And V3s can use a much higher resolution.

author: theatrus
author_rank: Frequent Contributor
timestamp: June 21, 2017, 06:45:40 am
content: PSoC is also single source - I can swap processors or opamps as commodities, but buying a magic unicorn box is a great way to be sad at a later date.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 07:06:42 am
content: Quote from: theatrus on June 21, 2017, 06:45:40 amAgreed. Socketed op amps are godsend since they all follow the same pinout. So are the 8051 based microcontrollers (with a few AVRs being almost pin compatible with the 8051s)Having all major components separated means I can swap parts without respinning the board should one vendor ceased business. Also I will have some pins, pads or traces to poke a multimeter or oscilloscope at. Even if the original chip comes in a unicorn pinout as long as it is a simpler chip cheap 2L adapter boards can be made to retrofit another vendor's chip on one dead vendor's chips' footprints.PSoC are good chips for experiments and one-off projects that you do not expect having to repair or intend to throw away in a few years. If you intend to keep a product alive for longer times and keep maintaining it you damn well hope either Cypress the unicorn company stays alive for that long and still produces the chip you used (at least c compatible one) or you have used standard products that is easily replaceable.

author: danadak
author_rank: Super Contributor
timestamp: June 21, 2017, 04:47:46 pm
content: QuoteThats one of the almost un-achievable aspects of the hi tech biz these days. One only has to lookat the history since 70s of the number of very big companies that have been absorbed or gone outof business, Philips, National....Whole product lines spun off into oblivion. And who is trained to seethe future ?Insofar as Cypress is concerned, look at the annual reports as a starting point. Basically they have anindustry standard core coupled with a process that can handle mixed signal. That aspect one couldcomfortably state will continue to experience demand. Look at the roadmap, also the frequency of toolupdates, release of new families, parts, as a way of telling if they are viable. The Cypress MCD div shippedalmost ~$1B in 2016.QuoteOf course there are reliability issues with that approach. Power issues. And if a competitor sees thoseincreased costs and your market is sizable that's an opportunity to attack that solution. Eg. becausethat solution has increased procurement, assembly costs, just a fact of life.For sure no one in their right mind would claim PSOC came from God. It has its place, seems like in itshistory of shipments it found good fit in many products.Lastly published unit pricing is notoriously inaccurate. Direct contact with Cypress reps and field saleswill give a much more accurate picture of costs. Especially future pricing estimates.Regards, Dana.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 21, 2017, 04:57:09 pm
content: Quote from: danadak on June 21, 2017, 04:47:46 pmMicrochip still supports PICs from 20 years ago, so if you used one in your design, you can still buy replacement parts.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 05:18:12 pm
content: Quote from: danadak on June 21, 2017, 04:47:46 pmTry explain to me why NASA are still using 80C86 to this day. Speaking of which, outside of collectors, there are still a lot of Apple II's or IBM PC's surviving. But for the computers since Pentium it is hard pressed to find one that still works after 15-20 years. Back then no chip is single sourced so finding a replacement is (still) fairly easy even to this day: You got a dead Socket 7 CPU - get another one from whatever manufacturer that still have the required performance and you are good to go.Quote from: danadak on June 21, 2017, 04:47:46 pmIf you perform a more careful analysis you will find out that PSoC have a generally higher cost if some defective units are involved. As I have stated before PSoC in general is much more expensive than other platforms. This may be offset in the manufacturing but when you put failed components, rework and warranty repair into consideration the tip of the balance goes to semi-discrete solution again: if a PSoC stack failed it is either the entire board or the $20 PSoC chip is being tossed out. But for a semi-discrete stack I can rework the board and only toss out some much cheaper components - at worst the $5 V3s + $2 MCP3911.And I can segregate the market by physically removing or down specifying the chips, actually cutting the cost of lower tiered products, instead of producing the lowest end products using the same full scale stack and rely entirely on a software limitation to the performance (and risk being hacked or being called Digital Restriction Management encumbered.) My old example of the headphone amp is relevant here again - the board can be produced using the same STM32 + MCP42010 + op amp socket, and the market segment the board targets is determined by the chip inserted to the socket - LM324 (with a GD32 as the main microcontroller - GD32 can be considered a second source for STM32 with pin-to-pin compatible products) for the low end, TL074 for medium grade, and OPA4134 for the audiophile market.You have been entirely focusing on the R&D cost but I am performing lifetime cost analysis here. PSoC have the benefit of low R&D cost (hence a fantastic prototyping tool - no more need of big messes of wires on a breadboard.) But when you start rolling the boards in mass production, taking in RMA's and sending out support engineers you would wish you did not keep using PSoC in the final product: the cost of reworking failed boards skyrockets. I'dexplore and experiment using PSoC, but when I prepare to submit the PCB to manufacturing I would have redrew the schematic from PSoC creator (don't get me started on this) using internal blocks to EAGLE using separate chips.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 06:06:10 pm
content: Quote from: NorthGuy on June 21, 2017, 04:57:09 pmAnd Microchip maintains pin compatibility across the entire product lines.Failed PIC16F877 and no replacement part at hand? Whack a PIC18F4550 in there and port the code over, you get a working board again.Also since that is a simpler chip I can build an an adapter fitting an AVR or 5V tolerant ARM in there to make it work.

author: danadak
author_rank: Super Contributor
timestamp: June 21, 2017, 10:33:17 pm
content: We may be arguing two diverse sets of experiences.I see your experience has been with what sounds like significant field failures.Where mine has been, over the course of 30 years, dramatic reductions across theboard in field failure. Memory to micro to analog. In early part of my career, 45 yearsago, as a production engineer on MOS line, we drove process and design failure ratesinto noise levels. The Japanese did the same in memory. In my experience the primaryremaining failures these days are passives and interconnect. I repair scopes, othergear for fun, spend most of my time on passives, and an occasion power bipolar, or diode.The NASA reference, my career spanned primarily moderate to very high volumedesigns. But as a field engineer I did have to deal with product obsolescence issues,and these took many paths, from your experience to true EOL product termination andfollow on redesign.Product diversification,for sure I can understand your point. But then silicon programmability,route-ability, can certainly aid in this. Here my experience has been that designs were largely3 -5 year lifetime target, then entire redesign. In my account base as FAE most, not all, ofproduct span was software driven. In fact many designs the HW was almost irrelevant in theprogram management, it was all software development.So I think we have quite different experiences coloring our viewpoint, at least in my casethat is surely true.So in summary I tend to think minimum parts, get rid of interconnect.Regards, Dana.

author: technix
author_rank: Super Contributor
timestamp: June 21, 2017, 11:41:53 pm
content: Quote from: danadak on June 21, 2017, 10:33:17 pmI am Chinese. Folks here tend to abuse their shit a lot. There are just way too many repairs of people break their stuff.Quote from: danadak on June 21, 2017, 10:33:17 pmThis goes back to my point: when a simpler component is EOL’d I can poke around and find a replacement to go on next production run, without having to respin the board itself and pay for the new masks.Quote from: danadak on June 21, 2017, 10:33:17 pmPeople will take your stuff apart. The moment they find out that your base model and premium model have the same PCB components people will start hacking it to squeeze the premium performance out of the baseline parts, and give you the bad reputation of selling DRM-encumbered hardware. Remember Rigol and Riglol hack, by putting a generated code into your DS1054Z you get a DS1104Z?Also this eats away my margin of profit as the base model and premium model have the very same hardware and thus production cost. When I can replace or remove components I can actually cut costs on the base model by not using the best components or not installing some components at all.This also prevents people from loading the premium firmware into the base model and expecting it to work - you have to rework the PCB itself before trying the software hack.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 22, 2017, 01:45:23 am
content: Quote from: danadak on June 21, 2017, 10:33:17 pmIndeed, that's whole reason MCUs were invented - the more you can do inside the chip the better.But there's a downside - in order to make it attractive to more customers you have to stuff it full of features that most of them will never use, or produce dozens of variations with different feature sets. With PSOC you don't have to do either.I have an application that needs just two things - an 8 bit parallel slave port to interface to a 5V CPU bus, and SPI for an SD-card. I wanted to do it all in one chip without a bunch of level convertors, external logic gates or a CPLD. It has to be available in a reasonably small package but still 'DIY friendly' (no BGA etc.) and modestly priced. I spent a lot of time examining the datasheets of dozens of PICs and onlyoneseemed to be suitable (and even that needed a few level converters). I have a PIC32MX150F128D which has both a parallel slave port and SPI, but guess what - due to a pin assignment conflict you can't use both at the same time!PSOC is theonlyMCU that will do what I want, and I if I want something different it willstilldo it.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 02:25:41 am
content: Quote from: Bruce Abbott on June 22, 2017, 01:45:23 amI can spin the same PCB and leave different portions of the circuit unpopulated or underspecified. With PSoC the premium and baseline products have the same production cost thus eating away at the profit margin of the lower end models. But for my optional mounting on PCB trick the baseline models are indeed cheaper to build.Once again, do you remember the Rigol hack? It is simpley because that Rigol built the baseline and advanced models using the same PCB people started hacking it to make the baseline model work like an advanced one. Try count up how much revenue you would lose in this kind of hacking, and the bad reputation of selling DRM-encumbered products.Quote from: Bruce Abbott on June 22, 2017, 01:45:23 amTry WCH CH563. It does all the above at the same time (the only set of conflicting pin assignments I know of is the parallel master and slave ports, but that does make sense as it can put the main CPU on hold and perform DMA on its own this way.) And it is a 32-bit MCU too based on ARM9 core.Quote from: Bruce Abbott on June 22, 2017, 01:45:23 amTry shop around a bit and you will find other options than PSoC that satisfies your needs.

author: george.b
author_rank: Frequent Contributor
timestamp: June 22, 2017, 03:06:36 am
content: No love for the MSP430?

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 03:25:39 am
content: Quote from: blueskull on June 22, 2017, 02:43:32 amIt is a 3.3V part with 5V tolerant I/O. So I would assume useable in a 5V system.Quote from: blueskull on June 22, 2017, 02:43:32 amARM9.Quote from: blueskull on June 22, 2017, 02:43:32 amNo idea. Ask WCH for this.Quote from: blueskull on June 22, 2017, 02:43:32 amThey do, although the translation is a bit rusty.Quote from: blueskull on June 22, 2017, 02:43:32 amWCH have ARM9 license and they cooked up the remaining IP cores themselves.Quote from: blueskull on June 22, 2017, 02:43:32 amYou have to ask WCH for this.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 03:28:32 am
content: Quote from: george.b on June 22, 2017, 03:06:36 amDon't bother mentioning anything other than PSoC now in this thread - flame war ongoing. My trying to defend off the PSoC warriors is probably going to get me banned soon.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 04:13:10 am
content: Quote from: blueskull on June 22, 2017, 03:34:46 amThey took out the entire CP15 so it no longer an actual ARM9 core, thus only ARMv5 compatible.Also show me the proof that TI or ST or NXP have SD license.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 05:00:12 am
content: Quote from: blueskull on June 22, 2017, 04:40:30 amSD card have built-in DRM features which is extremely underused, and that is the only other technology the SD license would offer along with UHS-II, since for generic block devices the card would be simply placed into 1- or 4-bit MMC mode, which is license free. SDHC and SDXC capacity additions are made in coordination with MMC team (hence the 16GB eMMC being available now) so it is not covered in SD license. (The DDR modes on SD cards seemed to me like a response to the 8-bit mode in MMC. Also the UHS-II additional pins seemed to me like a half-hearted imitation of UFS SCSI interface or NVMe PCIe interface.)For WCH CH563: they took the CP15 out of their implementation of an ARM9-based core, hence it is no longer a complete ARM9 core, instead it can only be called ARMv5-compatible. Their "SD" interface is actually a 4-bit MMC interface incapable of making use of the DRM features of SD interface.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 05:12:39 am
content: Quote from: blueskull on June 22, 2017, 05:04:06 amThere is a passing mention on Wikipedia saying that SD cards have DRM features which MMC lacked, but there is barely anyone using it AFAIK. For any other purposes SD in SPI, 1-, 4-bit and UHS-I modes is electrically and logically equivalent to, at least compatible with MMC.So there are only two features of SD that really mandates a SD license: DRM and UHS-II. The first is barely used anywhere (maybe except Windows Phone 7.) The second have stiff requirements for the host interface, not a lot of people would be even able to think about using.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 05:44:56 am
content: Quote from: blueskull on June 22, 2017, 05:25:54 amI think historically it was SD tracking MMC and keeping being a strict superset of MMC. Coming to the SDHC days there have been a lot of cross licensing and technology feedback going on, with MMC taking up the high capacity capabilities first designed by SD association. The SD association knows what technology is being borrowed from MMC and what is their own creation.TechnologyStatusSPI modeSD -> MMCMMC/SD 1-bit modeMMC -> SDMMC/SD 4-bit modeMMC -> SDMMC 8-bit modeMMC onlySDIOBased on standard MMC/SD 1-/4-bit mode anyway32GB and 2TB support (SDHC and SDXC)SD -> MMCUHS-IISD onlyDRMSD only, rarely used

author: Unknown
author_rank: Unknown
timestamp: June 22, 2017, 06:00:25 am
content: Quote from: blueskull on June 22, 2017, 03:29:49 amCode Composer Studio and the free TI Compiler are pretty good. Decent libraries in their "MSP430ware" package. Well documented. A reasonable selection of packages across the line from small to large, including DIP if that's your thing. I don't care for DIP anymore but a lot of hobbyists still like it. The FRAM parts are intriguing if you were previously dependent on EEPROM or Flash. Popular and good community support. That's all important stuff, right?It is a little more expensive than the competition, but not that much. Maybe a dollar more or so? It's something to take into account for quantities over 1000, I guess. Certainly not the sort of pain I had recently trying to stock up on STM32F405 at $10/chip, since I needed the two USB OTG host interfaces. That became expensive really fast.MSP430 isn't a crazy whiz-bang everything included platform, but it has the sort of peripherals that most projects would need. I like it. I don't look for everything on one chip. I would rather just have enough UARTs that I can talk to what I want.It's a pretty good platform for someone trying to deal with a PIC16 and the sad XC8 compiler situation, and looking to try something new (the original post in the thread). So is any Cortex M0+ chip if you want to see what the ARM hype is about, or a whole lot of products.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 22, 2017, 07:19:57 am
content: Quote from: technix on June 22, 2017, 02:25:41 amFor me the PCB is likely to cost more than the chip, so I would rather not have unpopulated areas that I may never use.QuoteI wouldn't lose because I wouldn't have played such a dirty trick on my customers. And if they find a way to make it more advanced then more power to them! (warranty void of course...).QuoteFigures. The device I am trying to duplicate (and improve) is the CH376.I downloaded the CH563 manual, but it's written in Chinese and Google couldn't translate it. Is there an English version? Google couldn't find any suppliers either. Where do you buy the chip?

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 07:46:59 am
content: Quote from: Bruce Abbott on June 22, 2017, 07:19:57 amI may have a different mindset than yours here - I design the top of the line product first, then cut it down to form the lower tier products.Also having multiple different PCBs not only can cost more in production but also increases the cost of stocking them. With one single PCB taking care of an entire product line I can maneuver the business much more nimbly by pulling or adding components as needed. Hell I can even rework RMA'd high tier boards into useable lower tiered one by slicing traces. Yes my production cost can be slightly higher but the long term maintenance cost is grinded down into the mud.Quote from: Bruce Abbott on June 22, 2017, 07:19:57 amThink again. If you differentiate the market only by the code loaded into the PSoC, isn't that the same as the Rigol here?For me if you paid more you do actually get more circuit - either more components mounted, or better components mounted.Quote from: Bruce Abbott on June 22, 2017, 07:19:57 amCH376 is a 5V tolerant chip in the first place, with internal 3.3V regulator for the USB stack... If your system does not use 3.3V elsewhere you just need to hook a bypass cap to the V3 pin and it would work.

author: FrankBuss
author_rank: Unknown
timestamp: June 22, 2017, 08:25:02 am
content: Quote from: technix on June 22, 2017, 07:46:59 amBy this logic a PC with only Linux installed on it would cost the same as a PC with some expensive commercial software pre-installed on it.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 08:38:09 am
content: Quote from: FrankBuss on June 22, 2017, 08:25:02 amWindows and Linux are licensed from someone else - just like the components on boards that is bought from someone else. I am talking about codeyoucreated that goes into the PSoC.Either you have developed the code for different tiers of product separately (which does not make sense - why are you reinventing the wheels over and over again,) cut the code to match the product tier (hack bait,) licensed it from somewhere else (like this Windows vs Linux scenario - it is the end user pirating someone else's code, not really my business) or you are hurting your own margin of profit in the lower tier product.For me there is only one shared firmware code that is common across all models, from the baseline to the most advanced. The POST process will detect the presence of various subsystems and enable or disable the corresponding software features accordingly (please do not tell me you don't have a POST procedure...)

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 22, 2017, 12:07:22 pm
content: No one mentions DIP packaging.There is no better choice if you want DIP i found out, please tell me if it is not correct.

author: tszaboo
author_rank: Super Contributor
timestamp: June 22, 2017, 12:32:39 pm
content: Quote from: technix on June 20, 2017, 03:09:07 pmQuote from: technix on June 22, 2017, 03:28:32 amI always imagine them like a bunch of birds, flying in through every window, and strating "PSOC PSOC PSOC PSOC""You can add two values with PSOC hardware"... but I dont want to..."Its so great, its only 10 bucks for the devboard. I used it to blink an LED. Eat it! Eat it!"

author: igendel
author_rank: Frequent Contributor
timestamp: June 22, 2017, 12:55:16 pm
content: Quote from: NANDBlog on June 22, 2017, 12:32:39 pmWhat's PSoC? Is it some kind of a microcontroller? Is it better than the other kinds?...sorry, couldn't help it

author: alm
author_rank: Super Contributor
timestamp: June 22, 2017, 01:16:46 pm
content: Quote from: JanJansen on June 22, 2017, 12:07:22 pmNo one? What about Elf's post about MSP430 just a few posts above yours?Quote from: JanJansen on June 22, 2017, 12:07:22 pmDefine better? On the low end MSP430 and AVR are both available in DIP. I believe at some point NXP made an ARM Cortex M0 in DIP, but I am not sure if that is still available. I do not think there is much competition for PIC32 in DIP.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 01:48:17 pm
content: Quote from: JanJansen on June 22, 2017, 12:07:22 pm32-bit: There are the PIC32 line, LPC810M021FN8 and LPC1114FN28.16-bit: PIC24, dsPIC30, dsPIC33 lines, MSP430 line.8-bit: Well classic 8-bit are still available in 8-bit packages.

author: ebclr
author_rank: Super Contributor
timestamp: June 22, 2017, 01:57:22 pm
content: "What's PSoC? Is it some kind of a microcontroller? Is it better than the other kinds?"Your answer is on this linkhttps://brightcove.hs.llnwd.net/e1/uds/pd/1362235890001/1362235890001_5241352463001_2606504288001.mp4?pubId=1362235890001&videoId=2606504288001

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 02:02:18 pm
content: Quote from: NANDBlog on June 22, 2017, 12:32:39 pmThis comparison is lit.Quote from: NANDBlog on June 22, 2017, 12:32:39 pmAnd the value adding doesn't really work out in a lot of cases.Quote from: NANDBlog on June 22, 2017, 12:32:39 pmI am okay with burning $10 now so I bought one. I am going to verify the fact content of whatever they claimed it to be. Blog posts upcoming.

author: igendel
author_rank: Frequent Contributor
timestamp: June 22, 2017, 02:02:56 pm
content: Quote from: ebclr on June 22, 2017, 01:57:22 pmThanks, but I think you missed the bottom line of my post...

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 02:22:13 pm
content: Quote from: igendel on June 22, 2017, 02:02:56 pmI do appreciate the humor, but you might be feeding the flame...

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 22, 2017, 02:51:25 pm
content: Quote from: alm on June 22, 2017, 01:16:46 pmOh sorry, did not see.Quote from: alm on June 22, 2017, 01:16:46 pmI mean improvement over the best PIC chips in DIP, like top of the line, newest stuff only.PIC chips in DIP has 28 pins, i would like to have a 40 pin package also.Do the NXP has free compiler without any paying involved for better performance ?,not that PIC is bad if you set your project from optimize 0 to optimize 1 ( still free ),it frustrates me that i risk one day to loose a lot of money because i want full optimize, i better buy nice hardware for that money.Ok i know : need to buy converter sockets for those SMD chips, maybe a microscope and more, first lets see what i still can get in DIP.If no one buys DIP they are being faded out of production faster also.Quote from: technix on June 22, 2017, 01:48:17 pmThanks, will take a look.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 03:27:07 pm
content: Quote from: JanJansen on June 22, 2017, 02:51:25 pmIt is an ARM Cortex-M0 chip so GCC and LLVM/clang would work... If you have trouble finding vendor tools you might as well skip it entirely and go straight to (vanilla) Eclipse CDT + GNU ARM Eclipse + GCC ARM Embedded toolchain.Quote from: JanJansen on June 22, 2017, 02:51:25 pmSadly true. I tried to find the 28-pin LPC1114FN28 but all I find for LPC1114 line is QFP-48 ones.You can find adapter boards for most SMT packages that fits breadboards. I even have QFP-48 STM32F303CCT6 on such adapters.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: June 22, 2017, 03:54:13 pm
content: Quote from: JanJansen on June 22, 2017, 02:51:25 pmI'm surprised that any company is still making DIP parts. Only hobbyists really use them, and the volume associated with that is peanuts. It must be because they still have a large stock of legacy parts sitting on shelves.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 04:03:16 pm
content: Quote from: Sal Ammoniac on June 22, 2017, 03:54:13 pmA lot of cheap gadgets made in China still uses the 80's DIP on single layer board construct - damn cheap to make.

author: JPortici
author_rank: Super Contributor
timestamp: June 22, 2017, 04:35:00 pm
content: i like to use socketed dip chips for pats that may blow up, like drivers/comparatorswhen making a new product i start with a protoboard with the target MCU. if same core/peripherals but dip+less pins part is available i use that one (microchip the great)i usually don't have a lot of space for that enormous adapters, also a lot less wires to solderfor 8 bitters i prototype with sockets also because i can upgrade/downgrade/change with pin to pin compatible by just removing chip from socket and inserting a new one

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 05:42:50 pm
content: Quote from: JPortici on June 22, 2017, 04:35:00 pmFor me I socket all DIP chips regardless of purpose. The adapter boards comes with a SMD footprint and all pins broken out to breadboard compatible format. For adapters of packages SO-8 and smaller the adapter board is usually the same size as a 0.3in DIP package of the same pin count. SO and SOJ adapters can go up to 48 pins with 0.6in width. And I also have a 0.6in wide QFP48 adapter.

author: alm
author_rank: Super Contributor
timestamp: June 22, 2017, 06:41:33 pm
content: Quote from: JanJansen on June 22, 2017, 02:51:25 pmIt would surprise me to see any new series of micros came out in DIP. Even the recentish low-end STM8 core is not available in DIP as far as I know.Quote from: JanJansen on June 22, 2017, 02:51:25 pmI think Microchip is pretty much the only vendor to strip optimization from a compiler. More common is a code size limit for either programming or debugging. NXP has their own LPCXpresso/MCUXpresso (they acquired the company behind it, Code Red, a couple of years ago) which is Eclipse + CDT + gcc + their proprietary debugging/programming stuff. The only limitation as far as I know is a fairly generous programming limit. As with any ARM chip, you can also just grap the open source ARM gcc compiler, Eclipse, CDT etc to have a fully open source IDE.Quote from: JanJansen on June 22, 2017, 02:51:25 pmTheir are also numerous development boards in DIP footprint that might work for prototyping.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 22, 2017, 07:23:25 pm
content: Quote from: Sal Ammoniac on June 22, 2017, 03:54:13 pmI'm surprised that platforms such as the Arduino and Raspberry Pi exist - only hobbyists use them.Some manufacturers think the hobbyist, educational and and small-scale professional markets aren't worth chasing. They make MCUs you never heard of and nobody wants.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 22, 2017, 07:36:38 pm
content: Quote from: technix on June 22, 2017, 07:46:59 amI don't think you quite understand. The CH376 'works' but has performance issues. Since it doesn't appear to be hackable, I need another chip to replace it.You suggested the CH563, which looks like it could be a good choice. However without a readable datasheet and source of supply it isuseless. Can you help me? If not then PSOC is still my best option.

author: technix
author_rank: Super Contributor
timestamp: June 22, 2017, 11:31:38 pm
content: Quote from: Bruce Abbott on June 22, 2017, 07:36:38 pmIt takes time and money to translate the documentation. I can help but only if someone is willing to pay for the labor.As of the chips I can source them for you directly from WCH (it is a two hour drive from Shanghai to Nanjing, where WCH is located.)

author: twiddle
author_rank: Contributor
timestamp: June 23, 2017, 03:12:02 am
content: Quote from: technix on June 22, 2017, 03:27:07 pmBoth the NXP DIP package chips are still listed as being in production, but it looks like they have absurdly high MOQ and none of the major distributors bother any more.Makes me glad I managed to get 15 or so LPC1114 when element14 stocked them, they are great for testing, but I wish I had grabbed some of the LPC8XX as an alternative to ATTiny85s. If you can find anybody selling the 1114, they are ideal for getting into ARM with absolute minimal cost, gcc works well with them (as it should for most Cortex-M).I second the adapter boards - I've used 48 and 64-pin packages on breadboards via them - its not ideal but it gets the job done.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 23, 2017, 04:16:44 am
content: Quote from: twiddle on June 23, 2017, 03:12:02 amI use lots of adapter boards with sockets. They let you easily prototype with practically any package. This one is for TQFP:I use them even with DIP packages, which are still the easiest to deal with:For dual packages, such as SOIC or SSOP, I solder them on a PCB SSOP-to-DIP adapters and then I can easily plug them into my ZIF sockets.

author: Bruce Abbott
author_rank: Frequent Contributor
timestamp: June 23, 2017, 03:27:15 pm
content: Quote from: technix on June 22, 2017, 11:31:38 pmYou don't need to translate it, just convert the pdf text to something Google Translate can handle (or tell me how to do it).

author: technix
author_rank: Super Contributor
timestamp: June 23, 2017, 03:31:42 pm
content: Quote from: Bruce Abbott on June 23, 2017, 03:27:15 pmTry open it with Windows version of Word 2016.

author: technix
author_rank: Super Contributor
timestamp: June 23, 2017, 03:35:19 pm
content: Quote from: NorthGuy on June 23, 2017, 04:16:44 amThese are fancy.I got the most simple type - I just solder the chip and a strip of pins onto the board and good to go.

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: June 23, 2017, 03:37:19 pm
content: Quote from: Bruce Abbott on June 22, 2017, 07:23:25 pmAnd some of those manufacturers sell millions of those parts nobody wants.

author: igendel
author_rank: Frequent Contributor
timestamp: June 23, 2017, 03:44:02 pm
content: About these adapter boards with sockets for SMD parts - Do they cause problems with external capacitors or crystals that need to be very close to the MCU pins?

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 23, 2017, 03:46:47 pm
content: Quote from: alm on June 22, 2017, 06:41:33 pmA program limit or no optimize is the same to me, i would like to use all space possible for lookuptables without limits,using all space for lookuptables can only be done with ASM for PICs, i only can code in C.How about the competition ?, can they use all ROM for LUTs ?Open source sounds good, if i dont have to compile anything, i like original stuff better.

author: technix
author_rank: Super Contributor
timestamp: June 23, 2017, 03:55:10 pm
content: Quote from: JanJansen on June 23, 2017, 03:46:47 pmI write LUTs in C (big const array) so...Actually for some architecture (like ARM) the open source stuff may actually be the best: For GCC the GNU folks adds architecture independent optimizations to all available architectures so ARM code may benefit from something that originated from Intel or IBM. For LLVM/clang we have Apple and Google being two of the biggest contributors, both being very will known for their ARM-based systems (iOS and Android respectively) and have every reason to add as much optimizations as they can.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 23, 2017, 04:30:31 pm
content: Quote from: igendel on June 23, 2017, 03:44:02 pmThe big socket board has SMD capacitors on the bottom. The small one only has two TH capacitors on top (0.1uF decoupling cap at the power entry and 10uF next to the ZIF, which is sometimes needed) - it is for PIC16/18 which are rather low frequency. I've never had any problems with those and I have lots of such sockets.As to the crystals, you can see the connectors to place crystals. This certainly isn't close to the MCU pins, but I've never had any problems with those neither. Of course, this is not what you would do for production, but this works fine for testing and prototyping.

author: alm
author_rank: Super Contributor
timestamp: June 23, 2017, 05:48:02 pm
content: Quote from: JanJansen on June 23, 2017, 03:46:47 pmWith programming limit I meant the size of the file it will program in a target. That is what NXP does in their own IDE. Again, it is just a packaged version of GCC, GDB, Eclipse, CDT, etc, plus some features like dedicated register views. There are other packaged versions of this stuff likeAtollic(limits advanced features like multi core, tracing and RTOS, no code size). I believeCooCox CoIdeis fairly popular with Windows users wanting a free IDE without having to do much setup. Generally these third-party IDEs will support all common ARM Cortex lines like STM32, NXP LPC1xxx andTI Teva.I do not see the problem with putting stuff in ROM in C. Something likeCode:static const uint8_t = { 1, 4, 6, ... };Should end up in ROM.

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 24, 2017, 01:55:23 pm
content: Quote from: alm on June 23, 2017, 05:48:02 pmI wish that would work for my DSPIC33FJGP802it can only be done in ASM they say, i need that without learning ASM.Someone posted some ASM code, i dont wanto copy it without knowing what it is, unreadable stuff.Then i wanto mix it together with C code, maybe that can mess things up also ?

author: technix
author_rank: Super Contributor
timestamp: June 24, 2017, 02:04:33 pm
content: Quote from: JanJansen on June 24, 2017, 01:55:23 pmMaybe you need to add some kind of keyword to tell the compiler you need to put the code in program Flash, like the PROGMEM on AVR.

author: nctnico
author_rank: Super Contributor
timestamp: June 24, 2017, 02:22:38 pm
content: I'm not familiar with the DSPpic family but DSP usually means a Harvard architecture where you can't easely access data from the flash (ROM) except for the program machinecode because you have two seperated address spaces. The ASM code probably copies data from the ROM to RAM but if you initialise the data the C startup files should do that. Anyway nowadays it really isn't necessary to mess with thise kind of obfustigated architectures unless you need crazy performance. Just move over to ARM which has a single address space and (depending on the core) DSP extensions and SIMD instructions.

author: cv007
author_rank: Frequent Contributor
timestamp: June 25, 2017, 01:23:07 am
content: QuoteFor the 16F, I do something like the following (if needed), I never used a dspic so maybe does not apply but usually there is a way to make the c compiler do what you want. In this case it works good for 14bit data or less.Code:void ascii_lookup_14seg(){//make known this 'function' used with 'global'//prepend '_' to asm nameasm("global _ascii_lookup_14seg");//as much data as needed (14bit or less)asm("dw 0,6,544,4814,4845,3108,9053,1024");//return added here, is ok}uint16_t rom_read(uint16_t waddr){PMADR = waddr; //set addressCFGS = 0; //flash spaceRD = 1; //start readNOP(); //next 2 instructions ignoredNOP();return PMDAT;}uint8_t n = 3;uint16_t val = rom_read( (uint16_t)ascii_lookup_14seg + n );A normal 'const' would place the data in flash as retlw instructions (14bits flash = 8bits data), where this is 14bits flash = 14bits data. If one is trying to squeeze some more code in available space, this could help. I was using just less than half of a 4Kword pic, and decided I wanted a bootloader so I could upload a newer 'app' to page1 (but page0 code cannot change and always runs on reset). I had a couple 'const' tables that were 14bit data, so I used the code above to save about 300words which enabled me to fit everything in page0. I also wrote the reset/irq jump code needed also in C (with 'asm' keyword), so you can do most things without leaving 'c' if wanted. In the end, I gave up the bootloader idea as its really not worth the trouble and am now back to using 35% of a 4Kword part, using normal 'const', although I also have plenty of extra ram so don't even need to use 'const'.Although I have previously used gcc with other micros (avr, arm) and have been familiar enough with the many gcc/gas options so can usually find/get what I want done, my only guide was the xc8 user manual. It had all the info I needed to move the page0 app up to make room for the reset/irq jump code, and to build an app that resided in page1.The free version of xc8 is fine for most users and the few extra instructions will not make any difference. If you feel you can't make it without the last bit of optimizations, I believe you can spend $30 on a one month subscription to xc8 pro.There are always different parts for different applications, but in defense of 8bitters- find me a 32bit part that can source/sink 20ma per pin with 250-350ma total, find me a 32bit part that can sleep with 100na or less, find me a 32bit part that can run from 1.8v-5.5v, find me a 32bit part that can be had in dip/soic/ssop/qfn, find me a 32bit part that comes in 6pins when I only need a few pins to do something simple, find me a 32bit part... I'll quit while I think I'm ahead

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 25, 2017, 01:42:25 pm
content: Hi, thanks for sharing.normally i have nothing to do with pages in C, i have no clue, exept that it has to fit in 1 page.I use lookuptables with 16 or 32 bit data.Now i have my sinus lookup-table in DSPIC like this :const unsigned short sinus4096[ 4096 ] = {0,};i better want to have this :const unsigned short sinus65536[ 65536 ] = {0,};Or even better if it fits the ROM, then i can use more partials ( harmonix ).

author: technix
author_rank: Super Contributor
timestamp: June 25, 2017, 02:47:09 pm
content: Quote from: JanJansen on June 25, 2017, 01:42:25 pmThis is huge - 256kB for a 64k-entry 32-bit LUT. Usually for this big an array I would compress the data in some way - either leveraging the mathematical properties (like for sine and cosine you only need 1/4 of one cycle of one waveform to store both) or using plain old compression algorithms (unlzma an array of data in ROM into external RAM)

author: JPortici
author_rank: Super Contributor
timestamp: June 25, 2017, 02:58:25 pm
content: Quote from: JanJansen on June 24, 2017, 01:55:23 pmI use rom constants on dspics all the time, i just need to declare them as const.There should also be a flash/rom qualifier for __attribute but const should be enough. What does the compiler manual say? I'm away so i can't checkI remember you have to tick a checkbox in compiler settigs for arrays bigger than 64k (elements?)

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 25, 2017, 04:24:42 pm
content: Thank you JPortici, i will take a look.When compiling there is a limit shown in the log for text, const data etc.Using more data then this size gives error.Especially when using LCD displays with a big menu, the text is always to much data to have, while my chip is around 50% full programmed.edit : i,m reading this now :http://microchipdeveloper.com/faq:75might solve things ?, gonna add codes i dont understand : __eds__ and __attribute__((space(psv))) or __attribute__((space(prog))) whatever that is for.I have the same attribute stuff in the interrupt code i copyd from the manual, i just ignore it.

author: JPortici
author_rank: Super Contributor
timestamp: June 25, 2017, 05:07:56 pm
content: Read the compiler manual.Also, the dspic programmer manual to have a better understanding of the architecturez psv etc

author: krho
author_rank: Regular Contributor
timestamp: June 25, 2017, 05:54:10 pm
content: Does the pic compiler really suck that much.. that's unable to calculate the size of array itself?e.g doesstatic const uint8_t[] = { 1, 4, 6, ... };fail?

author: JPortici
author_rank: Super Contributor
timestamp: June 25, 2017, 06:28:00 pm
content: How is it that 'you already know the size but you don't want to put it in declaration so the compiler sucks'?I really don't get itBut i think you can, i do delcare functions with const uint8_t message[] and put "this phrase" as an input variable

author: hans
author_rank: Super Contributor
timestamp: June 25, 2017, 07:24:28 pm
content: It's called C99. Make sure to enable it explicitly.And like the name suggests, it's an industry standard that's already 18 years old.XC8 does not support it. XC16 and XC32 do.C89 is the horror where this is not allowed:Code:void someFunction(uint8_t* data) {if (write8bits) {for (int i = 0; i < 8; i++) {}}}Because deceleration of variables must be at start of function.I'm working with other compilers, including ARM and FPGA softcores, that support C++11 and C++14 very well. XC32 does do C++11 as well, because it's GCC 4.8.x last time I checked.

author: cv007
author_rank: Frequent Contributor
timestamp: June 25, 2017, 08:10:44 pm
content: QuoteNo, that works fine.QuoteIt works just fine. If you want to declare (or decelerate) variables in that for loop, go right ahead.

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 26, 2017, 09:59:35 am
content: YEEESSS!, it works, adding __eds__ and __attribute__((space(prog))) works, together with the allow arrays bigger then 32K option,i have a sinus from 32768 positions now, it fills about 75% of the whole chip, i,m happy, gonna program/build a hammond organ emulation without interpolation now.thanks all, sorry for the topic hijack.greetingsbtw : i did not test, it does compile, should work.

author: JPortici
author_rank: Super Contributor
timestamp: June 26, 2017, 12:04:10 pm
content: Test it!And at some point i'd move everything from uint16 to int16 and then to fract and use the dsp. Granted you can use it anyway with int types, but fract is more appropriate (with the dsp accumulators the result goes up to +/- 256.0 to handle overflows... i'd use one for summing the tonewheels)Actually, i'd use fewer points and put the table in ram. Dspic33e is very skow at fetching data from flash (5 instructions cycles IIRC, whereas it needs 2 to fetch from ram. Also, with the dsp instructions you have multiple data fetches in a single instructions, so you can remove the lag from memory access time) and interpolate to get intermediate values if you really need more resolution. There is the thread on hot to calculate sine tables here that lists several interpolation methods with error, thd etc

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 26, 2017, 01:48:25 pm
content: What is a fract to be exact ?, i always like improvements.And yes some data i use in RAM, simple things, for the sinus i had problems,the integer version gives -32768 to +32767, while i use -32767 to +32767 for multiplying & symmetric audio,when using sinf( x ); i get some noise, i dont know why, i generate the LUTs in some software, then copy paste the code from the edit window.

author: JPortici
author_rank: Super Contributor
timestamp: June 26, 2017, 02:35:51 pm
content: Fixed point fractional numbers. The difference from int is in how multiplications are handled. Standard type is 1Q15 which means it goes from -1.0 to 1.0 in 1/32768 steps.. multiplications results are always between -1.0 and 1.0The dsp however can treat the 40bit accumulators as 9Q31, from -256.0 to 256.0 in 1/2^31 steps... this is to help you avoid overflow in sums without saturating arithmeticThen to go back to 1Q31, 32 bit, you just (saturate and) discard the upper byteTo convert from - to int is istantaneous, the data doesn't change at all, it's just a matter of how it is displayed and how you handle multiplications/divisionsWhy is it better for some tasks: your sine is from -1 to +1 at full volume. Your drawbar is set at 7. Instead of multiplying by 7 and dividing by 9* you just multiply by 0.77778*you can also use a table of multipliers so that you multiply by it and just take the higher word of the result (e.g.: 65535×7/9) to avoid any other division, but using fract is more readable... and if you move to a dsp with an FPU you just change the data type from q15 to float

author: FrankBuss
author_rank: Unknown
timestamp: June 26, 2017, 03:03:54 pm
content: That's why I really like a modern 32 bit CPU. Just buy a STM32F4, and you'll have integrated hardware floating point support, runs at 168 MHz and can do sin/cos calculation in realtime with 48 kHz samplerate and normal floats (4 byte single precision, I'v tested this, no problem). Nearly the same price as a dsPIC. And no crippled or non-standard compiler, the full power of GCC for ARM.

author: technix
author_rank: Super Contributor
timestamp: June 26, 2017, 03:39:03 pm
content: Quote from: FrankBuss on June 26, 2017, 03:03:54 pmIf you need even more speed (increased sample rate, channel count or complicated algorithm) you can step up to Allwinner V3s or Raspberry Pi Zero W. The former is much faster (Cortex-A7 @1.2GHz) but have a lot less RAM (64MB) and lacked a GPU. The latter is still fast (ARM1176JZF-S @1GHz,) have a lot more RAM (512MB for your LUTs) and have a GPU for your highly parallel math (like FFT.)Since both have connectivity options (wired Ethernet for V3s, Wi-Fi for Raspberry Pi Zero W,) you can use it as a gateway streaming the data to another system for computing (e.g. a workstation with a dual Intel Xeon and dual GeForce GTX 1080 Ti, or a virtual machine on Amazon EC2 or DigitalOcean.)

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 26, 2017, 03:41:15 pm
content: JPortici i still dont get it : my sine is from -32767 to +32767, nothing with float,for multiply i do : unsigned long l = i; l *= volume; l >>= SHIFT; nothing special.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 26, 2017, 04:19:41 pm
content: Quote from: FrankBuss on June 26, 2017, 03:03:54 pmOf course, if you buy one, the difference between $3 and $10 is not important. If you buy dev boards instead of chips, there may be no difference whatsoever. However, just $20 more will buy you much better processor, and for just $100 more you can buy Zynq which leaves the STM32F4 in the dust. Why do you settle for STM32F4?

author: Scrts
author_rank: Frequent Contributor
timestamp: June 26, 2017, 06:19:07 pm
content: Quote from: technix on June 26, 2017, 03:39:03 pmDid you try to write application that would do FFT on GPU on RaspberryPi?

author: technix
author_rank: Super Contributor
timestamp: June 26, 2017, 11:45:37 pm
content: Quote from: Scrts on June 26, 2017, 06:19:07 pmRaspberry Pi Foundation and Broadcom have released a GPU computing library, and FFT is one of the algorithms implemented in GPU. And there is a demo program that performs FFT in command line.

author: Scrts
author_rank: Frequent Contributor
timestamp: June 27, 2017, 02:48:59 am
content: Ok so you didn't. What about Allwinner stuff?

author: technix
author_rank: Super Contributor
timestamp: June 27, 2017, 08:03:37 am
content: Quote from: Scrts on June 27, 2017, 02:48:59 amAllwinner chip does not have an built-in GPU so all computation have to be handled using the Cortex-A7 core. You just pick your favorite, fastest ARM implementation of whatever algorithm you are using. Or just stream the data off to another computer that have more beefy processors.

author: FrankBuss
author_rank: Unknown
timestamp: June 27, 2017, 10:41:39 am
content: Quote from: NorthGuy on June 26, 2017, 04:19:41 pmMaybe because I just used the STM32L433 for a project and I really like itCosts only EUR 5.21 in single quantities, and I tested it, needs only about 10 mA at 3.3V and when running with 48 MHz. And this chip has the same floating point hardware support than the STM32F4 series. BTW, the STM32F401 costs only EUR 5.42 in single quantities and runs up to 84 MHz.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.

author: JPortici
author_rank: Super Contributor
timestamp: June 27, 2017, 12:31:20 pm
content: A pic32MZ can be about as cheap as that stm and run up to 250 MHz! Even faster.The endless debate...

author: Scrts
author_rank: Frequent Contributor
timestamp: June 27, 2017, 01:02:53 pm
content: Quote from: technix on June 27, 2017, 08:03:37 amIt'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.

author: FrankBuss
author_rank: Unknown
timestamp: June 27, 2017, 01:07:08 pm
content: Quote from: JPortici on June 27, 2017, 12:31:20 pmAt 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 27, 2017, 02:04:33 pm
content: Quote from: Scrts on June 27, 2017, 01:02:53 pmYou 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.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 27, 2017, 02:19:32 pm
content: Quote from: FrankBuss on June 27, 2017, 10:41:39 amQuite opposite. With Linux or not, Zynq will be much better at "hard realtime" thananyMCU. 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.

author: Scrts
author_rank: Frequent Contributor
timestamp: June 27, 2017, 02:49:19 pm
content: Quote from: mikeselectricstuff on June 27, 2017, 02:04:33 pmYou 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.

author: nctnico
author_rank: Super Contributor
timestamp: June 27, 2017, 03:03:57 pm
content: Quote from: NorthGuy on June 27, 2017, 02:19:32 pmNot 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.

author: NorthGuy
author_rank: Super Contributor
timestamp: June 27, 2017, 03:23:42 pm
content: Quote from: nctnico on June 27, 2017, 03:03:57 pmTo 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.

author: mikeselectricstuff
author_rank: Super Contributor
timestamp: June 27, 2017, 03:41:36 pm
content: Quote from: Scrts on June 27, 2017, 02:49:19 pmIs 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.

author: JPortici
author_rank: Super Contributor
timestamp: June 27, 2017, 03:50:23 pm
content: Quote from: FrankBuss on June 27, 2017, 01:07:08 pmAnd simd instructionsI think M7 is a better comparison

author: alm
author_rank: Super Contributor
timestamp: June 27, 2017, 04:26:41 pm
content: Quote from: mikeselectricstuff on June 27, 2017, 03:41:36 pmNot 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.

author: FrankBuss
author_rank: Unknown
timestamp: June 27, 2017, 04:37:19 pm
content: Quote from: alm on June 27, 2017, 04:26:41 pmThey provide a lot more information (but not all)https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdfEven the GPU (VideoCore) is now public:https://docs.broadcom.com/docs/12358545Would be nice if now someone implements OpenCL for it.

author: alm
author_rank: Super Contributor
timestamp: June 27, 2017, 05:03:46 pm
content: 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.

author: technix
author_rank: Super Contributor
timestamp: June 28, 2017, 02:02:32 am
content: Quote from: alm on June 27, 2017, 05:03:46 pmBroadcom 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.

author: westfw
author_rank: Super Contributor
timestamp: June 30, 2017, 08:56:36 am
content: QuoteSome 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.

author: JanJansen
author_rank: Frequent Contributor
timestamp: June 30, 2017, 02:14:15 pm
content: Quote from: JPortici on June 26, 2017, 12:04:10 pmIt dont works, bah, no huge sinus table for the DSPIC.

author: JPortici
author_rank: Super Contributor
timestamp: June 30, 2017, 02:59:17 pm
content: 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.

author: technix
author_rank: Super Contributor
timestamp: June 30, 2017, 05:09:28 pm
content: Quote from: JanJansen on June 30, 2017, 02:14:15 pmHow 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.

author: JPortici
author_rank: Super Contributor
timestamp: July 01, 2017, 07:01:51 am
content: 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 12each drawbar has to mix up to 44 sines and then you have to mix the (up to) 9 drawbars togetherIt's impressive if you manage to pull it offbut 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 memoryperhaps he has a different approach to this problem but this is how you'd have to do it with a single processorjust saying, HOAX: Hammond On A Xilinx (FPGA)

author: JanJansen
author_rank: Frequent Contributor
timestamp: July 01, 2017, 04:33:40 pm
content: Quote from: technix on June 30, 2017, 05:09:28 pmThank 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.

author: JanJansen
author_rank: Frequent Contributor
timestamp: July 01, 2017, 04:36:33 pm
content: Quote from: JPortici on July 01, 2017, 07:01:51 amYes, 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.

author: NorthGuy
author_rank: Super Contributor
timestamp: July 01, 2017, 04:45:56 pm
content: Quote from: JanJansen on July 01, 2017, 04:36:33 pmI 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

author: JanJansen
author_rank: Frequent Contributor
timestamp: July 01, 2017, 04:51:56 pm
content: Quote from: JPortici on July 01, 2017, 07:01:51 amFor 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:long out;out = sinus[ phase & MAX ]; // base partialphase *= 2;out += sinus[ phase & MAX ] / 2; // second harmonicphase *= 3;out += sinus[ phase & MAX ] / 3; // third harmonicand so on until the Nyquist frequency is reached ( half the samplerate ).out /= 2;[\code]

author: JanJansen
author_rank: Frequent Contributor
timestamp: July 01, 2017, 04:53:32 pm
content: Quote from: NorthGuy on July 01, 2017, 04:45:56 pmI 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.

author: JPortici
author_rank: Super Contributor
timestamp: July 02, 2017, 08:33:02 am
content: Quote from: JanJansen on July 01, 2017, 04:36:33 pmniceYou pic has DMA and probably also SPI in framed mode.. I read somewhere that it could mimick I2S in left/right modei 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 peripherali 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

author: technix
author_rank: Super Contributor
timestamp: July 02, 2017, 03:20:35 pm
content: Quote from: JPortici on July 02, 2017, 08:33:02 amI 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.

author: JanJansen
author_rank: Frequent Contributor
timestamp: July 02, 2017, 03:39:23 pm
content: I only use DIP packages, this one has build in audio DAC for around €5, other chips need DAC that is more expensive.

author: FrankBuss
author_rank: Unknown
timestamp: July 02, 2017, 11:11:41 pm
content: Quote from: JanJansen on July 02, 2017, 03:39:23 pmThis will restrict you a lot. For me it is easier to solder TQFP than using DIP chips, and you can use it on a breadboard with an adapter (cheap at eBay). But with services like [https://oshpark.com]OSH Park andseeedstudioit is really cheap to create a professional board for your application with all required parts, even for prototyping, if you place some strategically pin headers.My latest breakout board for a STM32L433, a NRF51822 bluetooth module and some pin headers for various ePaper displays:Smaller than 10 cm x 10 cm, so costs $0.49 per board (minimum 10 boards) at seeedstudio.

author: FrankBuss
author_rank: Unknown
timestamp: July 02, 2017, 11:29:54 pm
content: You don't need a concave shaped tip, there are good Youtube videos about it, Dave did one recently:Pin pitch doesn't matter. The trick is not to use too much solder, lots of flux, and if there is a bridge, it is easy to fix it with solder wick.

author: FrankBuss
author_rank: Unknown
timestamp: July 03, 2017, 01:08:39 am
content: In KiCAD there are hand solder version of most packages, with longer pads. If you use the default pads, which are perfect for reflow soldering, it can be difficult to solder it by hand.

author: technix
author_rank: Super Contributor
timestamp: July 03, 2017, 01:12:31 am
content: Quote from: blueskull on July 02, 2017, 11:15:01 pmLots of flux.I drag solder QFP packages a lot. It is normal to have solder bridges after the first pass, but it can be fixed with a big chisel tip that sucks the solder away with a lot of flux.

author: Unknown
author_rank: Unknown
timestamp: July 03, 2017, 02:56:42 am
content: Quote from: FrankBuss on July 02, 2017, 11:11:41 pmI agree; most of the parts I want to use these days only come in surface mount. So I just went all in and set myself up for it.Here are some bad cellphone photos of what I was working on today:Soldered only using a Hakko FX-888D with chisel tip, and solder wick:Fresh out of the reflow oven, with more through-hole parts added manually:The oven is great; it is aControLeo2built on a$32 toaster oven. Total cost was somewhere around $250 plus a few evenings of time. Some care when building it and it met the profile on the first learning cycle, and has worked without issue.I also have a hot air station, etc. but again, it is possible to get started with just a basic soldering iron. In any case I think if one prepares well there is no reason to shy away from surface mount. Even if only to make boards to break out modules to DIP for breadboarding. But I usually just go straight to PCB and keep multiple projects up in the air so that the ~2 week turnaround doesn't get to me.

author: westfw
author_rank: Super Contributor
timestamp: July 03, 2017, 03:00:50 am
content: QuoteSo I have a board with a 48pin QFN, that I was going to solder with "smear on some paste, place chip, heat on a hotplate, and let wicking and surface tension do all the hard work" method. But after looking at the actual board, and doing some actual experiments with the "smear paste" method on simpler components, I'm starting to have some doubts (especially give the lack of inspectability of a QFN.)Any advice? It seems that most of the video tutorials suggest reflowing the solder on to the pads as a separate step BEFORE placing the chip (smear flux/paste, melt, cool, smear more flux, place chip, heat again...) That seems like it would probably help. yes? no?

author: NorthGuy
author_rank: Super Contributor
timestamp: July 03, 2017, 03:10:39 am
content: Quote from: FrankBuss on July 02, 2017, 11:11:41 pmI 100% agree. Pin-for-pin, TQFP is much faster to solder than DIP. Not to mention that you can save lots of money on board size because you will need much smaller PCB, which are also easier to work with. I have just ordered a breadboard adapter for PIC32MZ DA from OshPark with Internet, USB and LCD headers, and it was only $40 for 3 4-layers boards. Size matters!

author: Sal Ammoniac
author_rank: Super Contributor
timestamp: July 03, 2017, 06:04:36 am
content: Quote from: blueskull on July 02, 2017, 11:15:01 pmThey do.http://www.okinternational.com/metcal/english/globalnavigation/products/hand-soldering-systems/tips-and-cartridges/mx-cartridges/smtc-series-hoof