| Author |
Message |
Don Foreman
Guest
|
Posted:
Thu Dec 08, 2005 9:31 am Post subject:
In-circuit emulation and debugging for PIC |
|
|
I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
|
|
| Back to top |
|
 |
Martin Riddle
Guest
|
Posted:
Thu Dec 08, 2005 9:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
Not sure about CCS, haven't heard anything good about it.
I've been using WIZ C by Forest Elect. Dev. It has a great emulator built into the IDE, never had to use an emulator. Other than a
bug or 2 ( they all have em) it was the best investment I made in a long time.
Plus it adheres to the C standard more so than the CCS.
Cheers
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message news:cv9fp11scpbqjf6t9r9rg4d11b9gq854qr@4ax.com...
| Quote: | I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot? |
|
|
| Back to top |
|
 |
Don Foreman
Guest
|
Posted:
Thu Dec 08, 2005 9:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
This looks interesting.
I don't care about conformance to C standard because I don't need to
be compatible with anything or anyone. I'm about 99% retired, want
to use PIC's and C for some gadgets I've thought about for a long
time.
Ease of learning and ease of use are my primary objectives. I don't
yet know C and have never programmed a PIC, so ease of learning and
availability of good tutorial material is important. I want math,
trig functions and floatingpoint arithmetic which I assume are
present in Wiz C. The "great" software emulator sounds very
interesting.
Can you embed assy language code in Wiz C?
Once you have a program that looks OK in simulation, how do you
program your parts? I'll be using flash parts exclusively, probably
just the smaller ones with 20 pins or less so surfacemount will be
managable with hand assy.
On Thu, 08 Dec 2005 04:10:09 GMT, "Martin Riddle"
<martinriddle@hotmail.com> wrote:
| Quote: | Not sure about CCS, haven't heard anything good about it.
I've been using WIZ C by Forest Elect. Dev. It has a great emulator built into the IDE, never had to use an emulator. Other than a
bug or 2 ( they all have em) it was the best investment I made in a long time.
Plus it adheres to the C standard more so than the CCS.
Cheers
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message news:cv9fp11scpbqjf6t9r9rg4d11b9gq854qr@4ax.com...
I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
|
|
|
| Back to top |
|
 |
Mike Harrison
Guest
|
Posted:
Thu Dec 08, 2005 9:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On Wed, 07 Dec 2005 21:31:04 -0600, Don Foreman <dforeman@NOSPAMgoldengate.net> wrote:
| Quote: | I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
|
I'd go for ICD2 if for no other reason that you know it will be the first to support new parts |
|
| Back to top |
|
 |
Ian Bell
Guest
|
Posted:
Thu Dec 08, 2005 5:35 pm Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
Don Foreman wrote:
| Quote: | I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
|
If you are familiar with the 6502 and the 6800 you might be better off with
one of the modern Motorola micros like the 68HC11 - streets ahead of the
PIC.
Ian |
|
| Back to top |
|
 |
Mike Young
Guest
|
Posted:
Fri Dec 09, 2005 12:27 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message
news:e3efp1po77lfevkjlk43vcclskfg25qvfn@4ax.com...
| Quote: | This looks interesting.
I don't care about conformance to C standard because I don't need to
be compatible with anything or anyone. I'm about 99% retired, want
to use PIC's and C for some gadgets I've thought about for a long
time.
|
It's really not a matter of standard C. CCS does things a little different
from other compilers, mostly in setting up the chip and peripherals. In
assembler and most other C, you would set bits in control registers to, for
example, setup a timer or PWM. There's a close correlation between the
datasheet and your code. With CCS, you code a pseudo function call, but not
really a function call. They are hard coded keywords in the compiler, a step
even farther removed from closed source. If it doesn't work -- ECCP was
still broken when my support contract expired -- you're relying on CCS to
issue a compiler update. Hiding the details is good for portability, but is
a frustrating hindrance when things aren't working. Their headers don't
define registers or bit locations, making it difficult to code around
problems. That aside, if you can ignore it, the code can be quite small and
elegant, and easily retargetted at other chips within a family. I'm not a
strong supporter, but the concept can work given time for the tool to
mature.
| Quote: | Ease of learning and ease of use are my primary objectives. I don't
yet know C and have never programmed a PIC, so ease of learning and
availability of good tutorial material is important. I want math,
trig functions and floatingpoint arithmetic which I assume are
present in Wiz C. The "great" software emulator sounds very
interesting.
|
Floating point and trig are probably not realistic for 8 bit
microcontrollers. Certainly it can be done, but I rather view PICs as very
flexible interface chips. A 32-bit ARM7 or dsp would be a better match for
number crunching. I think you and the chips will be happier if you can
separate device control from higher level decision making.
The boon and bane of software emulators is setting up the stimulus files. On
one hand, you have very fine control and can setup conditions very
accurately. On the other, non-trivial conditions take a bit of work to
setup. In-circuit debugging is the more flexible alternative.
| Quote: | Once you have a program that looks OK in simulation, how do you
program your parts? I'll be using flash parts exclusively, probably
just the smaller ones with 20 pins or less so surfacemount will be
managable with hand assy.
|
PICs are programmed in place through a five wire interface, ICSP. I put an
RJ12 on most boards for this. A six pin male header is a direct fit for the
PICkit2. I tire of routing the ICSP lines on single and two sided boards,
and think from time to time of building a programmer on an 8-pin IC test
clip.
In regards pin count and hand assembly, I get very good results reflowing in
a wok on the kitchen stove. Solder paste can be had pretty cheaply; I bought
a syringe for less than $20 recently. Stir frying causes far less heat
stress than hand soldering.
If you're not firm on PICs, AVR is worth considering. I like the price of
their development software: free if you use the GCC compiler. The PICC Lite
(freebie) compiler doesn't support many of the interesting chips. If tool
cost isn't a significant issue, you can be quite happy with either. If cost
is a consideration, AVR has a slightly lower entry cost with, I think,
better tools. I'm quite pleased with the $55 JTAG/ISP clone I bought. It
debugs in place on chips that are capable, and programs the remainder
through ISP. The ICD might not be such a good fit for the smaller PICs. You
need specialized chips to debug in place. The PICkit2 is a reasonable
alternative if you can/have to live without debugging. Self-powered on USB
for $50 is not at all bad.
Starting out on a PIC, I would buy the PICkit2. It comes with a 16F690,
protoboard, and 2 CDs of software and datasheets. For the AVR, I would buy
MCPro's JTAG/ISP and the Butterfly. Download AVRStudio and WinAVR for free.
The Butterfly has a 6 character LCD, piezo speaker, and joystick button,
compared to the PICkit2's 4 LEDs, pot, and single pushbutton. $75 versus
$50. Heck, get them both. :) |
|
| Back to top |
|
 |
John B
Guest
|
Posted:
Fri Dec 09, 2005 12:36 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On 08/12/2005 the venerable Don Foreman etched in runes:
| Quote: | I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
|
If you are planning to work in 'C' then keep away from the PIC, which
is really only suitable for assembler programming. Choose a micro that
is specifically design for a high level language. The Atmel AVR is
excellent and there is a large variety of both hardware and software
support tools. Have a look at
http://www.avrfreaks.net/
for a start.
--
John B |
|
| Back to top |
|
 |
Mike Young
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
"Martin Riddle" <martinriddle@hotmail.com> wrote in message
news:3P3mf.3865$605.3266@trndny09...
| Quote: | Wiz C has a demo availble. www.fored.co.uk
....
The simulator is nice. A intuitive GUI. You can even add devices to chip
pins (leds etc) or define your own. Serial devices as well.
Even stimulus files. You can even export to mplab. Ver 12 has a lot added.
For $180, its really a steal.
|
Nice. The only thing better would be full integeration with PSPICE for
simulation, but that would be too cool for mere mortals. Does the $180
include the simulator as well as the compiler? |
|
| Back to top |
|
 |
Mike Young
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message
news:m7dhp19kpvbdovpeocledgaeqqpahh11l0@4ax.com...
| Quote: | That doesn't sound good. Could I just skip the keywords and program
the registers with inline assy code? That would blow portability
but that won't be an issue for me. Other compiler you'd recommend
in the same price range with a good user interface that isn't too
cryptic? I don't want to have to learn a DOS-like command line
compiler.
|
CCS is uniquely priced among those supporting mid-range PICs. HiTech
impresses me as worthy tools, but is about half your entire budget.
Microchip's C18 is also pricey, but can be used for free on non-commercial
projects with optimizations disabled. (For 18F chips, of course.) All
integrate into MPLab; no command line stuff unless you want it.
Inline assembler is always possible, but you'll then have to manage the
PIC's paged register addresses manually (one of their least endearing
traits). There's no need to drop to assembler for that, however. uC
compilers generally support bit and register operations directly. You only
have to define where the registers are, and assign names for bits. Assembler
won't simplify the task.
| Quote: | Good point. I need to walk before I run, though. My numbercrunching
will be pretty modest. Example: accept data from a GPS and a digital
electronic compass, compute an error vector from a stored location,
produce signals to steer and throttle an electric trolling motor so it
serves as a " virtual anchor".
|
That's pretty lightweight, as you say; no problems there. Vector math on
scaled integers, no floating point, should suffice. The most you might need
is square root; I would try to get away from even that much.
The application sounds pretty cool.
| Quote: | Hm! I have a "digital flatiron" I made, using a 4 x 5 x 1/2" piece
of aluminum jigplate, an 800-watt heater from a 30-cup percolator, a
type K thermocouple and a little Omega controller. Think that'd work
for reflow? I have a syringe of solder paste in the freezer.
|
That should work just fine. The heat mass of the 1/2" plate might cause temp
overshoot, depending on where you put the thermocouple. |
|
| Back to top |
|
 |
Martin Riddle
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
Wiz C has a demo availble. www.fored.co.uk
You can intermix C and Assmebler. Or go straight C or Assmebler.
As Mike pointed out CCS has its oun way of setting registers. Wiz C is true memory maps. Define the links to the registers and use
them in C. (much like Keil compiliers)
Also Wiz C has its own semi GUI building blocks, not sure what you calll them. Place them connect them, set them and your finished.
Neat, but you can forgo that method and do straight programming the old fashioned way.
The simulator is nice. A intuitive GUI. You can even add devices to chip pins (leds etc) or define your own. Serial devices as well.
Even stimulus files. You can even export to mplab. Ver 12 has a lot added. For $180, its really a steal.
I use a picpro programmer and David Tates software. Fored also has programmers and ICD's. Priced right too. And I use flash based
parts.
www.dontronics.com is a distributor. I Ordered thru them with out a hitch, stuff was here in NY with-in a week.
Support is very good too. If you find a bug, Robin is prompt is dealing with it.
Cheers
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message news:e3efp1po77lfevkjlk43vcclskfg25qvfn@4ax.com...
| Quote: | This looks interesting.
I don't care about conformance to C standard because I don't need to
be compatible with anything or anyone. I'm about 99% retired, want
to use PIC's and C for some gadgets I've thought about for a long
time.
Ease of learning and ease of use are my primary objectives. I don't
yet know C and have never programmed a PIC, so ease of learning and
availability of good tutorial material is important. I want math,
trig functions and floatingpoint arithmetic which I assume are
present in Wiz C. The "great" software emulator sounds very
interesting.
Can you embed assy language code in Wiz C?
Once you have a program that looks OK in simulation, how do you
program your parts? I'll be using flash parts exclusively, probably
just the smaller ones with 20 pins or less so surfacemount will be
managable with hand assy.
On Thu, 08 Dec 2005 04:10:09 GMT, "Martin Riddle"
martinriddle@hotmail.com> wrote:
Not sure about CCS, haven't heard anything good about it.
I've been using WIZ C by Forest Elect. Dev. It has a great emulator built into the IDE, never had to use an emulator. Other than
a
bug or 2 ( they all have em) it was the best investment I made in a long time.
Plus it adheres to the C standard more so than the CCS.
Cheers
"Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message news:cv9fp11scpbqjf6t9r9rg4d11b9gq854qr@4ax.com...
I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
|
|
|
| Back to top |
|
 |
Don Foreman
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On Thu, 08 Dec 2005 18:27:47 GMT, "Mike Young"
<boat042-spam@yahoo.com> wrote:
| Quote: | "Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message
news:e3efp1po77lfevkjlk43vcclskfg25qvfn@4ax.com...
This looks interesting.
I don't care about conformance to C standard because I don't need to
be compatible with anything or anyone. I'm about 99% retired, want
to use PIC's and C for some gadgets I've thought about for a long
time.
It's really not a matter of standard C. CCS does things a little different
from other compilers, mostly in setting up the chip and peripherals. In
assembler and most other C, you would set bits in control registers to, for
example, setup a timer or PWM. There's a close correlation between the
datasheet and your code. With CCS, you code a pseudo function call, but not
really a function call. They are hard coded keywords in the compiler, a step
even farther removed from closed source. If it doesn't work -- ECCP was
still broken when my support contract expired -- you're relying on CCS to
issue a compiler update. Hiding the details is good for portability, but is
a frustrating hindrance when things aren't working. Their headers don't
define registers or bit locations, making it difficult to code around
problems. That aside, if you can ignore it, the code can be quite small and
elegant, and easily retargetted at other chips within a family. I'm not a
strong supporter, but the concept can work given time for the tool to
mature.
|
That doesn't sound good. Could I just skip the keywords and program
the registers with inline assy code? That would blow portability
but that won't be an issue for me. Other compiler you'd recommend
in the same price range with a good user interface that isn't too
cryptic? I don't want to have to learn a DOS-like command line
compiler.
| Quote: |
Ease of learning and ease of use are my primary objectives. I don't
yet know C and have never programmed a PIC, so ease of learning and
availability of good tutorial material is important. I want math,
trig functions and floatingpoint arithmetic which I assume are
present in Wiz C. The "great" software emulator sounds very
interesting.
Floating point and trig are probably not realistic for 8 bit
microcontrollers. Certainly it can be done, but I rather view PICs as very
flexible interface chips. A 32-bit ARM7 or dsp would be a better match for
number crunching. I think you and the chips will be happier if you can
separate device control from higher level decision making.
|
Good point. I need to walk before I run, though. My numbercrunching
will be pretty modest. Example: accept data from a GPS and a digital
electronic compass, compute an error vector from a stored location,
produce signals to steer and throttle an electric trolling motor so it
serves as a " virtual anchor".
| Quote: |
The boon and bane of software emulators is setting up the stimulus files. On
one hand, you have very fine control and can setup conditions very
accurately. On the other, non-trivial conditions take a bit of work to
setup. In-circuit debugging is the more flexible alternative.
|
I think I'll order an ICD2.
| Quote: |
Once you have a program that looks OK in simulation, how do you
program your parts? I'll be using flash parts exclusively, probably
just the smaller ones with 20 pins or less so surfacemount will be
managable with hand assy.
PICs are programmed in place through a five wire interface, ICSP. I put an
RJ12 on most boards for this. A six pin male header is a direct fit for the
PICkit2. I tire of routing the ICSP lines on single and two sided boards,
and think from time to time of building a programmer on an 8-pin IC test
clip.
In regards pin count and hand assembly, I get very good results reflowing in
a wok on the kitchen stove. Solder paste can be had pretty cheaply; I bought
a syringe for less than $20 recently. Stir frying causes far less heat
stress than hand soldering.
|
Hm! I have a "digital flatiron" I made, using a 4 x 5 x 1/2" piece
of aluminum jigplate, an 800-watt heater from a 30-cup percolator, a
type K thermocouple and a little Omega controller. Think that'd work
for reflow? I have a syringe of solder paste in the freezer.
| Quote: |
If you're not firm on PICs, AVR is worth considering. I like the price of
their development software: free if you use the GCC compiler. The PICC Lite
(freebie) compiler doesn't support many of the interesting chips. If tool
cost isn't a significant issue, you can be quite happy with either. If cost
is a consideration, AVR has a slightly lower entry cost with, I think,
better tools. I'm quite pleased with the $55 JTAG/ISP clone I bought. It
debugs in place on chips that are capable, and programs the remainder
through ISP. The ICD might not be such a good fit for the smaller PICs. You
need specialized chips to debug in place. The PICkit2 is a reasonable
alternative if you can/have to live without debugging. Self-powered on USB
for $50 is not at all bad.
|
Yes. I ordered one yesterday.
| Quote: |
Starting out on a PIC, I would buy the PICkit2. It comes with a 16F690,
protoboard, and 2 CDs of software and datasheets. For the AVR, I would buy
MCPro's JTAG/ISP and the Butterfly. Download AVRStudio and WinAVR for free.
The Butterfly has a 6 character LCD, piezo speaker, and joystick button,
compared to the PICkit2's 4 LEDs, pot, and single pushbutton. $75 versus
$50. Heck, get them both. :)
|
I will definitely look at the AVR job as well. I've budgeted $1K for
tools and miscellany to get going, since I just finished a job and
have a few bux in the coffer.
THANKS!!! |
|
| Back to top |
|
 |
Don Foreman
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On 08 Dec 2005 18:36:42 GMT, "John B"
<spamj_baraclough@blockerzetnet.co.uk> wrote:
| Quote: | On 08/12/2005 the venerable Don Foreman etched in runes:
I'm trying to get off the ground with PIC's as a rank beginner --
although I have worked with micro's (6502, 6800) in the dim and
distant past when I was not one of the dinosaurs roaming the earth....
I'm trying to decide between Microchip's ICD2 and the ICD-U-40 from
CCS. I'll be using the CCS C compiler sometimes, other times I'll be
working with assy.
Anyone have any suggestions on which way I should go? Can the more
expensive ICD-2 do some things that the ICD-U40 cannot?
If you are planning to work in 'C' then keep away from the PIC, which
is really only suitable for assembler programming. Choose a micro that
is specifically design for a high level language. The Atmel AVR is
excellent and there is a large variety of both hardware and software
support tools. Have a look at
http://www.avrfreaks.net/
for a start.
|
I'm hearing a recurring theme here. I'm glad I asked!
I do have stuff for which the small PIC's really will be suitable, but
I'm hearing that I may want to gain capability (eventually) with two
families: the PIC's for small simple stuff and the AVR for projects
where using C would be highly desirable in preference to assy
language.
This old linear dog is having a hell of a time getting off the digital
dime, but it's time to do it. Unnnnngggghhhh! |
|
| Back to top |
|
 |
Robert Scott
Guest
|
Posted:
Fri Dec 09, 2005 1:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
| Quote: | "Don Foreman" wrote:
CCS does things a little different
from other compilers, mostly in setting up the chip and peripherals. In
assembler and most other C, you would set bits in control registers to, for
example, setup a timer or PWM. There's a close correlation between the
datasheet and your code. With CCS, you code a pseudo function call, but not
really a function call. They are hard coded keywords in the compiler, a step
even farther removed from closed source.
|
I use the CCS compiler, but I don't use any of their pseudo function
calls to set up peripherals. I figured those were shortcuts for
people who didn't want to bother learning how to do it themselves.
The only bother is that I have to make my own header file that gives
the register addresses for PORTA, etc. Then I just use regular C
source (not assembly) to initialize peripherals, interact with them,
and everything. I don't think the CCS approach has restricted me in
any way. It only takes a few minutes to make up a header file
containing the registers that you want to reference.
-Robert Scott
Ypsilanti, Michigan |
|
| Back to top |
|
 |
Don Foreman
Guest
|
Posted:
Fri Dec 09, 2005 9:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On Fri, 09 Dec 2005 00:02:57 GMT, "Mike Young"
<boat042-spam@yahoo.com> wrote:
| Quote: | "Don Foreman" <dforeman@NOSPAMgoldengate.net> wrote in message
news:m7dhp19kpvbdovpeocledgaeqqpahh11l0@4ax.com...
That doesn't sound good. Could I just skip the keywords and program
the registers with inline assy code? That would blow portability
but that won't be an issue for me. Other compiler you'd recommend
in the same price range with a good user interface that isn't too
cryptic? I don't want to have to learn a DOS-like command line
compiler.
CCS is uniquely priced among those supporting mid-range PICs. HiTech
impresses me as worthy tools, but is about half your entire budget.
Microchip's C18 is also pricey, but can be used for free on non-commercial
projects with optimizations disabled. (For 18F chips, of course.) All
integrate into MPLab; no command line stuff unless you want it.
Inline assembler is always possible, but you'll then have to manage the
PIC's paged register addresses manually (one of their least endearing
traits). There's no need to drop to assembler for that, however. uC
compilers generally support bit and register operations directly. You only
have to define where the registers are, and assign names for bits. Assembler
won't simplify the task.
Good point. I need to walk before I run, though. My numbercrunching
will be pretty modest. Example: accept data from a GPS and a digital
electronic compass, compute an error vector from a stored location,
produce signals to steer and throttle an electric trolling motor so it
serves as a " virtual anchor".
That's pretty lightweight, as you say; no problems there. Vector math on
scaled integers, no floating point, should suffice. The most you might need
is square root; I would try to get away from even that much.
The application sounds pretty cool.
Hm! I have a "digital flatiron" I made, using a 4 x 5 x 1/2" piece
of aluminum jigplate, an 800-watt heater from a 30-cup percolator, a
type K thermocouple and a little Omega controller. Think that'd work
for reflow? I have a syringe of solder paste in the freezer.
That should work just fine. The heat mass of the 1/2" plate might cause temp
overshoot, depending on where you put the thermocouple.
|
This is all very helpful. I'm printing your helpful messages. I'm
back to thinking I might try the CCS C compiler for simple PIC
projects that use a little math (like a tachometer), looking at
Atmel for more ambitious projects. A large appeal to the CCS
compiler is that it looks very easy to learn and use, and that 's
worth a few bux to me. I don't expect to get everything right first
go but I wanna get off the dime. I've been paralyzed for over 5
years. If I can't get off the dime with native wit, youthful vigor
and dazzling intelligence, then I'll throw money at it, dammit!
Shovel ain't workin', fire in the hole sort of approach. I've
budgeted $1K to get my feet wet with microcontrollers.
The thermocouple in the digital flatiron is within .030" (0.75 mm) of
the plate surface, right under the heater, in a well filled with
Omegabond 101. Even with the 800-watt heater and about no effort at
tuning the PI control, it doesn't overshoot more than a degree or
two. Regions more distant from the heater probably lag a bit.
I made it for use with PNP blue, "ironing" laser-printed patterns for
PC boards. It worked better than anything else I tried, but still
didn't work as well as I'd hoped and not well enough. I now use
pre-sensitized photo for simple one-sided boards and budgetPCB for
good double-sided boards with plated-thru holes. I do layouts and
simple boards even for simple circuits because I've never been a good
technician, about can't handwire a doorbell without screwing something
up. But I can usually get a schematic right. PCB software checks
layout against schem; when it's happy, all I need do is drill some
holes, stuff some parts and sling some solder. I sling solder just
fine. I even get the parts stuffed right-side-up most days. Current
adventure with this is control elex for my four-Luxeon microscope
ringlight for use in working with SMT parts. It's all linear, could
be an excellent candidate for a microcontroller project: control
brighness of the individual lights with a joystick and slewing button
to PWM the current sources. I'm presently using pots. It works,
but a joystick would be more intuitive to "drive".
I'm an old linear circuit designer and research puke, more recently
a half-decent machinist and weldor. I do appreciate your patience and
help with my efforts to get my feet wet with microcontrollers. |
|
| Back to top |
|
 |
Don Foreman
Guest
|
Posted:
Fri Dec 09, 2005 9:35 am Post subject:
Re: In-circuit emulation and debugging for PIC |
|
|
On Fri, 09 Dec 2005 00:41:49 GMT, no-one@dont-mail-me.com (Robert
Scott) wrote:
| Quote: | "Don Foreman" wrote:
CCS does things a little different
from other compilers, mostly in setting up the chip and peripherals. In
assembler and most other C, you would set bits in control registers to, for
example, setup a timer or PWM. There's a close correlation between the
datasheet and your code. With CCS, you code a pseudo function call, but not
really a function call. They are hard coded keywords in the compiler, a step
even farther removed from closed source.
I use the CCS compiler, but I don't use any of their pseudo function
calls to set up peripherals. I figured those were shortcuts for
people who didn't want to bother learning how to do it themselves.
The only bother is that I have to make my own header file that gives
the register addresses for PORTA, etc. Then I just use regular C
source (not assembly) to initialize peripherals, interact with them,
and everything. I don't think the CCS approach has restricted me in
any way. It only takes a few minutes to make up a header file
containing the registers that you want to reference.
-Robert Scott
Ypsilanti, Michigan
|
That is very encouraging. Thanks.
By the way, where (in general) do you live in Ypsi if you don't mind
my curiosity. I grew up in Ypsi many years ago. Went to
Roosevelt HS which was closed down some years ago. I lived on
Collegewood Drive a bit west of Cornell, which was a gravel road at
the time. Both of my folks worked at EMU, which was Michigan State
Normal College then. In those days there was nothing behind us
clear to the Huron river. I spent many pleasant summer afternoons
plinking crows with my .22 rifle (bolt-action Mossberg carbine)
not far from my back door. The bike and walking path that is now
there was once a railroad we called the "try-weekly" because they
tried to use it once a week or so. The roadgangs would return our
waves with a grin and turn off their weedsprayers when they passed
our garden that was really on the railroad's land. My dad and I
kept the weeds cleared with weedwhips.
A well- honed, well-swung weedwhip actually takes less effort than a
gas-powered string trimmer and it makes no noise at all -- other than
the bitching of the boy pressed into service swinging it. |
|
| Back to top |
|
 |
|
|
|
|