The impression I get is that PICAXE is based on the PIC cores, but geared to beginners, but I wanted to make sure before committing to any particular platform.
Electronic – the difference between PIC and PICAXE
microcontrollerpicpicaxe
Related Solutions
To be honest the line between the two is almost gone nowadays and there are processors that can be classified as both (AD Blackfin for instance).
Generally speaking:
Microcontrollers are integer math processors with an interrupt sub system. Some may have hardware multiplication units, some don't, etc. Point is they are designed for simple math, and mostly to control other devices.
DSPs are processors optimized for streaming signal processing. They often have special instructions that speed common tasks such as multiply-accumulate in a single instruction. They also often have other vector or SIMD instructions. Historically they weren't interrupt based systems and operated with non-standard memory systems optimized for their purpose making them more difficult to program. They were usually designed to operate in one big loop processing a data stream. DSP's can be designed as integer, fixed point or floating point processors.
Historically if you wanted to process audio streams, video streams, do fast motor control, anything that required processing a stream of data at high speed you would look to a DSP.
If you wanted to control some buttons, measure a temperature, run a character LCD, control other ICs which are processing things, you'd use a microcontroller.
Today, you mostly find general purpose microcontroller type processors with either built in DSP-like instructions or with on chip co-processors to deal with streaming data or other DSP operations. You don't see pure DSP's used much anymore except in specific industries.
The processor market is much broader and more blurry than it used to be. For instance i hardly consider a ARM cortex-A8 SoC a micro-controller but it probably fits the standard definition, especially in a PoP package.
EDIT: Figured i'd add a bit to explain when/where i've used DSPs even in the days of application processors.
A recent product i designed was doing audio processing with X channels of input and X channels of output per 'zone'. The intended use for the product meant that it would often times sit there doing its thing, processing the audio channels for years without anyone touching it. The audio processing consisted of various acoustical filters and functions. The system also was "hot plugable" with the ability to add some number of independent 'zones' all in one box. It was a total of 3 PCB designs (mainboard, a backplane and a plug in module) and the backplane supported 4 plug in modules. Quite a fun project as i was doing it solo, i got to do the system design, schematic, PCB layout and firmware.
Now i could have done the entire thing with an single bulky ARM core, i only needed about 50MIPS of DSP work on 24bit fixed point numbers per zone. But because i knew this system would operate for an extremely long time and knew it was critical that it never click or pop or anything like that. I chose to implement it with a low power DSP per zone and a single PIC microcontroller that played the system management role. This way even if one of the uC functions crashed, maybe a DDOS attack on its Ethernet port, the DSP would happily just keep chugging away and its likely no one would ever know.
So the microcontroller played the role of running the 2 line character LCD, some buttons, temperature monitoring and fan control (there were also some fairly high power audio amplifiers on each board) and even served an AJAX style web page via ethernet. It also managed the DSPs via a serial connection.
So thats a situation where even in the days where i could have used a single ARM core to do everything, the design dictated a dedicated signal processing IC.
Other areas where i've run into DSPs:
*High End audio - Very high end receivers and concert quality mixing and processing gear
*Radar Processing - I've also used ARM cores for this in low end apps.
*Sonar Processing
*Real time computer vision
For the most part, the low and mid ends of the audio/video/similar space have been taken over by application processors which combine a general purpose CPU with co-proc offload engines for various applications.
It's possible, but I think it's probably more likely that the pin you've connected the sensor to is related to the PIC's programming pins and/or reset function, and that the sensor is interfering with the programming protocol as a result.
That being said, if some component is overloading the power source (drawing too much current), the effect would be that the voltage that the power source was providing would dip. If it dips below the PIC's power-on voltage, you certainly won't be able to program it.
The PIC might also draw more current during the programming operation than it normally would, and the combination of that and the sensor load might have the same effect of critically dropping the voltage of your source (most likely resulting in an untimely reset of the PIC).
Best way to diagnose this is with a multimeter weasuring the source voltage with and without the sensor and with and without programmer attamhed (and with and without programming going on). If you observe a voltage drop, try it with a higher current-rated power source and see if you still get a drop.
Related Topic
- Electronic – RANDOM command in PBASIC
- How to effectively generate random number with PICAXE 08M2
- Electronic – Using a PIC to perform switch on and timed shutdowns in automotive environment
- Electronic – arduino – If YOU were starting out now, what PIC16F-compatible IDE and compiler would you choose, and why
- The difference between a ‘baseband processor’ and ‘baseband controller’
- Difference between two 12V PWM signals/circuits (PIC and NE555)
Best Answer
The various Picaxe chips are actually Pic chips with a small piece of code burnt in. This code acts as a bootloader for the chip, which simplifies things when it comes time to upload your code to the chip. You are restricted to using Picaxe's version of BASIC, or a flowchart based system.
Pics on the other hand are a number of different families of chips. The ones the Picaxes are based on are 8 bit chips, although there are dozens more to choose from in that range too. There are also 16 bit and 32 bit chips too. They can be programmed in Assembler or C (and various other languages if you can find compilers or bootloaders for them) using various tools available direct from Microchip their manufacturer.
In terms of programming tools there are free IDEs for Picaxe for both Windows and Linux available from the Picaxe website. To get the code onto the chip you need either a Serial cable and a simple circuit to connect to the chip, or a USB cable from the Picaxe site which connects to the same circuit. There are quite a few extra items you can get, which can be interfaced to Picaxes all from their site.
As previously stated there is a free IDE for Windows which can be downloaded from the Microchip website and used to write either C programs or Assembler programs at least for the 8 bit chips (I've no idea whether it'll target the 16 & 32 bit chips I'll check later). There are various solutions available for Linux including Piklab and Pikdev. To get your code onto your chip you'll need either one of the traditional Serial or Parallel port programmers of which there seem to be hundreds on the internet, or a USB solution such as the Pickit 2 or 3 which as available from Microchip.
Although the Picaxes seem better suited if you are working with school children or have very little programming experience I'd say the Pics offer a greater flexibility and variety of products.
You may also want to investigate whether ATMEL chips or the Arduino which is based on them offer a better fit for your requirements. I found the Wikipedia pages detailing the various different families of microchip to be very useful for getting a handle on what was what with the various types of chip. I'll try and add some useful links when I'm back at my computer.