Author Topic: Atmel vs Pic in Linux environment  (Read 15633 times)

0 Members and 1 Guest are viewing this topic.

Offline igendel

  • Frequent Contributor
  • **
  • Posts: 359
  • Country: il
    • It's Every Bit For Itself (Programming & MCU blog)
Re: Atmel vs Pic in Linux environment
« Reply #50 on: June 25, 2017, 04:32:58 pm »
For hobby use, what is the reason to stick with 8-bit mcu's?

Kind of like asking, why do woodwork as a hobby if you can build with metal? Metal is stronger, lighter, usually more resilient, not to mention shiny!
Maker projects, tutorials etc. on my Youtube channel: https://www.youtube.com/user/idogendel/
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 16664
  • Country: 00
Re: Atmel vs Pic in Linux environment
« Reply #51 on: June 25, 2017, 04:39:25 pm »
For hobby use, what is the reason to stick with 8-bit mcu's?

Why would you even care how many bits it has?

The only question is: Does it do the job?  :popcorn:

« Last Edit: June 25, 2017, 09:25:56 pm by Fungus »
 

Offline JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Atmel vs Pic in Linux environment
« Reply #52 on: June 25, 2017, 05:20:14 pm »
That only applies to the 16-bit and 32-bit compiler. The 8-bit compiler shipped by Microchip (XC8) is proprietary, and as far as I know there is no legal version that is free and includes full optimization support.

You are right. I tend to forget that because we don't use 8-bit mcu's and only very occasionally 16-bit.

For hobby use, what is the reason to stick with 8-bit mcu's?
price, voltage levels, being able to do simple things with simple components...

Fun fact, the new pic18f25k42 is a beast. 12 bit adc (at least 11 enob), dma and vectored interrupt. Can do a lot of work even on commercial products.

Still, we get asked the 'bit' of our processors from time to time. We stir around the question because of course this is either a forum guy that doesn't understand shit and will smear us on forums... or more plausible, one of our competitors which claims 64 bit processing! That will smear us on forums
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Atmel vs Pic in Linux environment
« Reply #53 on: June 25, 2017, 11:00:33 pm »
For hobby use, what is the reason to stick with 8-bit mcu's?

Kind of like asking, why do woodwork as a hobby if you can build with metal? Metal is stronger, lighter, usually more resilient, not to mention shiny!

Because it is hard to get a decent Mission Oak finish.
 

Offline jiroTopic starter

  • Contributor
  • Posts: 16
  • Country: mx
  • We are slaves of our own freedom
Re: Atmel vs Pic in Linux environment
« Reply #54 on: June 27, 2017, 12:29:44 am »
I see that the microcontroller world have the same discussions as the programing "which languaje is the best" and it seems the answer is basically the same I say "depends on your needs or preferences". So I guess that is better to have options to decide which one suits better for a particular problem.

When I was looking in google for some additional information about what you posted here I found some guy's post who repaired a washing machine using a pic12XXX, the program was in assembly but it basically was "if this button is pushed do this, if that button is pushed do thar for this period of time, then this" . Why would you need a very complex micro for that?

In the other hand I love to see that there are toolchains that allows me to use stuff that I'm very familiar with (gcc, gdb...). I'm goint to play with Arduino (since it have a very nice support) and a few ARM based boads.

In the long run I'd like to get into IoT stuff , jut to play with..you know, turn on a led from the cloud  :-DD
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Atmel vs Pic in Linux environment
« Reply #55 on: June 27, 2017, 05:47:18 pm »

When I was looking in google for some additional information about what you posted here I found some guy's post who repaired a washing machine using a pic12XXX, the program was in assembly but it basically was "if this button is pushed do this, if that button is pushed do thar for this period of time, then this" . Why would you need a very complex micro for that?


You don't and a manufacturer wouldn't.  But that's an entirely different question than "which device should I play with?".  For one thing, the washing machine application, throughout the manufacturing life of the particular machine, isn't likely to change.  There won't be any 'feature creep'!

For a play toy, the answers will be different because there is no way of telling where a new user might want to go.  Sure they can play with a 6 pin PIC but they're going to run out of pins very quick.  If they want to write code in C, they probably don't want to use a PIC 16F.  If they want speed, they want to move to ARM.  If they want a bunch of canned projects, ready to go, they probably want to think about Arduino.

So, the right choice is difficult, if not impossible and, over time, all devices will get their turn.
 

Offline NorthGuy

  • Super Contributor
  • ***
  • Posts: 3146
  • Country: ca
Re: Atmel vs Pic in Linux environment
« Reply #56 on: June 27, 2017, 06:15:54 pm »
So, the right choice is difficult, if not impossible and, over time, all devices will get their turn.

I don't think the choices of things for hobby is difficult. Actually, the process of choosing is already part of the hobby, and a very interesting one. However, choices are different for different people. Therefore, it is impossible to give (or receive) a useful advice which would fit anyone. Everyone is different and is entitled to his own choices. But people trying to give advise try to suggest things which they would have chosen for themselves. This makes the whole conversation look incredibly complicated, but it's really very simple.
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 26906
  • Country: nl
    • NCT Developments
Re: Atmel vs Pic in Linux environment
« Reply #57 on: June 27, 2017, 06:46:36 pm »
So, the right choice is difficult, if not impossible and, over time, all devices will get their turn.

I don't think the choices of things for hobby is difficult. Actually, the process of choosing is already part of the hobby, and a very interesting one. However, choices are different for different people. Therefore, it is impossible to give (or receive) a useful advice which would fit anyone. Everyone is different and is entitled to his own choices. But people trying to give advise try to suggest things which they would have chosen for themselves.
Or not. One of the mistakes I made was messing with 8051s for way too long and spending more time on getting around the limitations of the architecture than getting my gadget going. Also if I would have access to microcontrollers with an ARM core at that time I would have been completely over the moon.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline jiroTopic starter

  • Contributor
  • Posts: 16
  • Country: mx
  • We are slaves of our own freedom
Re: Atmel vs Pic in Linux environment
« Reply #58 on: July 09, 2017, 11:38:06 pm »
Hi guys,

I guess that as my small contribution I should explain my process to decide what yo use and why so if anyone is up to a similar situation this could help, first at all most of the decition are based in personal convenience rather than the technical.

My first requirement was that the linux availavility of the toolchain, because as I mentioned in the original post most of my computers have Linux installed (Arch and Manjaro if you are curious), my first mistake was limit to Pic and Atmel because they are the most pospular (as pointed by ... here)

Then my second requirement was the language, since I basically don't have any experience with microcontrollers I wanted at least a known languaje (I could do some assembly code, but I'd rather not to) I use python in a daily basis along with bash and yaml (Ansible for automating stuff)  but uC for MifroPython seems to be a little expensive at the moment I'd rather to use C or some C based language (just because I already knew C), but then when I read a little more it was obvious to me that C is one of the stardard.

As you can imagine by now, none of those "filters" woth anything, because all mayor microcontrollers in the industry have (at least) nice support for linux. So, the next I couls think of was the price, but the difference are not that much at least not for hobby/start/messing around, jujst check the pirces in Ebay, Amazon or Ali Express. So I choose the wrong criteria  :palm: .

Also I got some other recommendations (as mentioned here) there are a lot of ARM based solutions that can do the job, they are a little more expensive, but you get more processing power . I'm waiting for my STM32F103 to arrive (thanks janoc for the suggestion) .

At the end I decided based on the calculation power (ARM) because I want to play with some AI and IoT, but I'm goint to start with arduino because of the community, documentation available and it have a lot of prebuilt modules (since I'm a beginner in electronics), at the long run I plan to do some of my own modules and go deeper, hopefully be able to design some simple gadgets/toys for me. That's my starting point from there I'll see what else I need in the future like lower power consumption, more calculation power or less if no need.

Well, that's my little contribution, not that much, but I hope somebody can benefit from this.


 

Offline thermistor-guy

  • Frequent Contributor
  • **
  • Posts: 372
  • Country: au
Re: Atmel vs Pic in Linux environment
« Reply #59 on: July 10, 2017, 01:19:42 am »
"That being said, I'm trying to decice between Pic and Atmel (I know they are both from Microchip) but based on the toolset available for linux."

I'm a big fan of Linux, but on most of my Linux PCs, I also run Win7 as a guest OS under Virtualbox. That allows me to run development tools on the host OS (Linux) or on the guest OS, as needed.

On machines that are Windows-native, I usually install Cygwin, to get access to GNU tools. Of course, you can also install Virtualbox on a Windows host, and run Linux as a guest OS, but I haven't needed to do that.

My point: even though you prefer Linux, you can still use Windows-based toolsets.
 

Offline jiroTopic starter

  • Contributor
  • Posts: 16
  • Country: mx
  • We are slaves of our own freedom
Re: Atmel vs Pic in Linux environment
« Reply #60 on: July 10, 2017, 06:53:42 pm »
My point: even though you prefer Linux, you can still use Windows-based toolsets.

Yes, I know, but I'd rather to use native tools as much as I can even when that implies a little more work (I already have a VM with Win7 to do some testing of other stuff)
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Atmel vs Pic in Linux environment
« Reply #61 on: July 10, 2017, 07:26:12 pm »
i do stuff with both in Linux - and not using wine.

for pic, use MPLAB-X,

for AVR use GCC and AVRdude.
if you cant be bothered setting up the avr toolchain manually, just install the Arduino-IDE.
that contains all the bits in one archive - as a bonus it can also handle ARM chips.
 

Offline MattSR

  • Regular Contributor
  • *
  • Posts: 95
  • Country: au
Re: Atmel vs Pic in Linux environment
« Reply #62 on: July 10, 2017, 08:45:57 pm »
One thing I have struggled with is finding instructions to set up the AVR-GCC toolchain - can you describe it or point me in the direction of a good tutorial?
 

Offline rstofer

  • Super Contributor
  • ***
  • Posts: 9890
  • Country: us
Re: Atmel vs Pic in Linux environment
« Reply #63 on: July 10, 2017, 08:53:22 pm »
For Windows - Google WinAVR

For Linux - most distros have AVR-GCC as a package

If you want to build from source: http://www.nongnu.org/avr-libc/user-manual/install_tools.html

I don't know how current that process is but I used it years ago.

I haven't looked but I suspect the Arduino toolchain contains most of what you can get with AVR-GCC except perhaps OpenOCD or some other JTAG support for debugging

Or you can install Atmel's toolchain.
 

Offline jiroTopic starter

  • Contributor
  • Posts: 16
  • Country: mx
  • We are slaves of our own freedom
Re: Atmel vs Pic in Linux environment
« Reply #64 on: July 11, 2017, 04:15:42 pm »
One thing I have struggled with is finding instructions to set up the AVR-GCC toolchain - can you describe it or point me in the direction of a good tutorial?

I don't know what distro you are using, but in Arch/Manjaro there are a few packages for AVR:



The coimpiler, debugger, Avrdude (to copy the compiled files to the uC) since those are in the official repositories they must be available in any .deb based distro (Debian, *buntu, mint...)
 

Offline stj

  • Super Contributor
  • ***
  • Posts: 2155
  • Country: gb
Re: Atmel vs Pic in Linux environment
« Reply #65 on: July 11, 2017, 04:22:01 pm »
exactly, if you download GCC for your chip, the package manager should select the rest of the toolchain.
 

Offline jaromir

  • Supporter
  • ****
  • Posts: 338
  • Country: sk
Re: Atmel vs Pic in Linux environment
« Reply #66 on: July 18, 2017, 08:58:47 pm »
For 8-bitters from Microchip I use SDCC/GPutils + my own programmer https://github.com/jaromir-sukuba/a-p-prog (actually it's derivative of this programmer running on PIC MCU, I recreated it on Arduino to be more accessible for other people). All components are open sourced.

SDCC is actually useful compiler, I use it for STM8 and 68HC08 chips too.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf