Hi! You may have read in the last day or two some news
in the PIC and AVR camps. Microchip and
Atmel, for you fanboys out there. Pretty exciting stuff.
As you may know, Microchip actually tried to buy Atmel
like 3, 4 years ago or something now. But it all fell
through and negotiations didn't work out, the financial crisis happened, somewhere or another
partner pulled out, blah blah blah. But the two companies have been talking
ever since then, and they've finally announced
what is a cross-platform technology sharing
agreement between the two companies, where
the tools from both companies are going to support the other company's
products! What the?! But as it turns out, it's not
as silly as it sounds, because they're now sharing
fabs, the two companies are co-operating on various levels
so it makes sense, I guess, for the
two companies to offer support for the individual products. So what
Atmel, first cab off the rank, they're going
to have a new AVR Dragon, almost identical to the
current AVR Dragon, but it's going to support
the Microchip parts. And vice-versa there will be very shortly,
if not already, a new PICkit 4, which will also have
device support for Atmel parts. Now Atmel have--
they don't have the new production hardware ready right now, but they
sent me some firmware upgrades for my existing
AVR Dragon board, as you may be familiar with,
that allows it to program Microchip PICa-- pa-- parts
and be compatible with the MP-- the new MPLAB X
environment! So woohoo! Give it a go!
Now this is actually rather clever and possible because
of-- not too dissimilar programming interfaces between
the two. If you know the PICkit 3 and the ICSP interface,
6 pin single inline header of course, but the
AVR ISP interface is a 6-pin dual inline header. But nothing you can't
fix with a adapter cable of course. But there are of course,
you know, protocol and other differences between the two. And of course
a lot of the PICs require that high voltage
programming source, that VPP source, which of course the AVR Dragon
you can do the high voltage programming part on there. But I believe
that the-- you have to wait for the new version of the AVR Dragon to get that capability,
they will have the Microchip ICSP port directly
on the board so you can just, you know, in a pin-- you don't need the adapter cable, just
plugs directly in. But I don't have the new hardware, I've only got the new firmware
for the existing one, which you're able to download.
for owners of the old AVR Dragon. So this old version of the board with the
new official firmware will only support
PICs with the low voltage programming-- LVP programming mode. So
we're going to actually try that today. I've got the new firmware programmed in. We're going to bring in
an old friend, the Micro Calc project. You may remember this from
quite a few years ago, I did a video on this, never finished the thing
unfortunately. World's first credit-card
thin scientific calculator. Really awesome little
project. Those bodge wires, if you remember, that was a silicon bug
did a video on this silicon bug inside the PIC24
series chip. Real pain in the ass that one was. So
it swapped the ICSP interface. We'll-- anyway,
this 24F PIC supports LVP mode, so
we should be able to program it with this new firmware. Let's give it a try.
And as far as I know, Microchip are not going to release firmware for
the existing PICkit 3 to support the AVR devices. But
you will be able to buy the new PICkit 4 which will support, I believe-- what
they're telling me is the full range of AVR chips. Awesome.
Because really, it's just a-- apart from the high voltage programming stuff, it's really just
a protocol difference between the two, because you're just driving
logic I/O pins basically. So, you know, that's how they're able to
do this. It's actually rather cool. So it's got to get power
from the actual board itself, and it does that by-- there's a second
VCC connector up here if you're familiar with the AVR Dragon, you can supply
power through to the board, no worries. So I've just got it
hooked up to the ISP, I've got the new official firmware in there.
Let's see if we can get this thing
talking. I mean we're plugging it--
plug it in and it doesn't auto-detect. What I've got here is the PICkit
3 programmer software, but it
will work inside MPLAB X or whatever software you want to use.
So it doesn't auto-detect. Let's go into Tools and it should
check communication-- it should identify it as a genuine
PICkit 3. It shouldn't know the difference. Tada!
Hey, PICkit 3 connected, ID, no worries!
Alright now let's give this thing a go shall we? We've got it
connected. No device detected there yet, because we haven't
chosen our device family. But once we choose our device family--
24F, hopefully it should auto-read, and let's give it a go.
Yep! And...
bingo! Look at that. PIC-- woohoo! We have a winner!
PIC24 device found. There it is!
24FJ256GA106
Alright we've got all FFs at the moment in that chip. So if we read it
let's give it a go. I can't remember what's actually programmed
into this thing. You know, I-- as far as I know
it doesn't work, there's nothing on the LCD, I was in, you know, debug mode
or whatever, I was mucking around it with last-- many years ago. I don't know. But it should
read in something, we should be able to read in some data. So let's give it a go,
shall we? Read. There we go, hey.
Our light's come on, it's reading, it's reading...
Come on. It's taking its fat time about it.
Oop, done. Look at that! Beautiful.
And now we have-- what do we have?
Yep, we've got data. It's no longer FF, it's all
1670, whatever that is, config done. But there is
yeah there is data there. So I don't know what program I had in this thing, but it
doesn't matter. So there you go, it reads-- there you go! We
have a-- we have an AVR
Dragon now supports PIC chips! Awesome.
And we'll try that same thing again, let's just write the same data back
because I don't have the original program. Who cares, let's just see if it writes.
It reads no problem at all. Program memory, also the configuration fuses,
everything. So we'll just write that.
Writing device, program memory... yeah,
could take awhile. Come back when it's done.
Well this thing's got like 256K of flash,
it's got a lot of flash in there so it will take a bit.
[ dave whistles ] Woohoo! There we go. Programming
successful. Bingo! That works
a treat! I declare that to be a winner. It's not running of course,
nothing actually runs on this-- firmware-- I powered it up before and--
before this, and it doesn't run at all so. We have
a winner! I like it. So there you have it, that worked
an absolute treat. We now have the AVR Dragon programming-- well,
in this case a PIC24F part no problems at all.
Reading and programming, that's just awesome. And apparently they're going to
now support-- Atmel are going to support all of the Microchip parts
and Microchip are going to support all of the Atmel parts officially
in their various development environments and on their
programming platforms like the AVR Dragon and the PICkit 3.
So watch out for the new AVR Dragon
version of this, which has the ICSP support on it, and the new PICkit 4
which is coming out shortly. I have been promised one. I don't know,
it could be in the mail but I'm definitely going to do some more videos on this when it
arrives, because this is a big historic announcement. I like it!
It means that you can choose either of the company's development tools
to support each other. And it makes sense. Companies like this
have to team up like this these days,
in order to survive. So it-- I, you know, it's
probably going to piss off a lot of the fan boys, they're not going to be happy. "Aww, the Atmel fan boys
I can-- I don't want my development tools polluted with that
Microchip crap, [ ranting unintelligibly ]", they're ranting in their mother's basement.
Goodness. Anyway, I like it. I give it a thumb's up,
it works. I haven't-- don't know what happens with the compiler
support at the moment, I haven't tried that. But all the details are on the
Atmel and Microchip websites, and I'll link those in
down below and you can check out the announcements and stuff for yourself.
So more videos coming soon. If you want to discuss it, jump on over to the
EEVblog Forum! And if you like the video, please give it a big thumbs up
as always. Catch you next time.
[ sparking sound ] captioned by sen