Hi RT,
I like the boat controller code! I'm spending some time
with it to understand how it works and to adapt it to the f84a. For a few days I
will only be able to simulate my work because of a mishap with a pair of
wayward needle nose pliers that wasted the f84a chip (dropped 'em on
my breadboard and shorted som portb pins)! I have been lucky in the fact that
this is the first component I have destroyed in about 2 years and I have
prototyped hundreds of designs both professionally and personally! I have a
couple more on the way and also an f628! If you have any experience with the 628
can you give me your thoughts on the internal oscillator (only going to use it
for testing code on the breadboard).
Thanks for all the correspondence. You have really helped
jump start my education with the PIC!
Regards,
Steve
|
|
Need help with PIC Macros
Started by ●April 16, 2003
Reply by ●April 22, 20032003-04-22
Reply by ●April 22, 20032003-04-22
Oddly enough I just finished a project with the 628 and I used the internal oscillator. Why not? I wasn't in a hurry. This project is a water level alarm for my sailboat. All of the leaks are not always above the water line! It too uses a co- operative multitasker but the code is written in C. Much easier to deal with. There are 4 water level probes in the bilge and when water is detected at any level an LED flashes and a Sonalert start beeping. There is also a heartbeat LED. Again these are flashed as tasks. The horn can be silenced, of course, but the real reason for all of this effort was to interface water level to a programmable alarm dialer. When the level reaches some stage a relay is energized which signals the alarm dialer. The dialer calls my cell phone and my home phone and recites a message about the water level. This works only when the boat is docked of course and that is the reason for the LEDs and Sonalert. I could be standing 3 feet away and the dialer is useless. I like the 628 but... There is no A/D converter only analog comparators. Ok for this project but I prefer the 16F876 for .300 pin spacing and the 16F877 when only a 40 pin will do. --- In , "Stephen D. Barnes" <stephendbarnes@h...> wrote: > Hi RT, > I like the boat controller code! I'm spending some time with it to understand how it works and to adapt it to the f84a. For a few days I will only be able to simulate my work because of a mishap with a pair of wayward needle nose pliers that wasted the f84a chip (dropped 'em on my breadboard and shorted som portb pins)! I have been lucky in the fact that this is the first component I have destroyed in about 2 years and I have prototyped hundreds of designs both professionally and personally! I have a couple more on the way and also an f628! If you have any experience with the 628 can you give me your thoughts on the internal oscillator (only going to use it for testing code on the breadboard). > Thanks for all the correspondence. You have really helped jump start my education with the PIC! > > Regards, > Steve > ----- Original Message ----- > From: rtstofer > To: > Sent: Tuesday, April 22, 2003 2:38 AM > Subject: [piclist] Re: Need help with PIC Macros > > During the 'clean-up' process at least one problem crept in. The > definition of Delay in CBLOCK has a semicolon where a colon is > required. > > I started playing with the cleaned up version plus the task changes > and noted the problem. > > --- In , "Stephen D. Barnes" > <stephendbarnes@h...> wrote: > > Thanks for the attachment. I'll be looking at it tonight. > > > > Regards, > > Steve > > ----- Original Message ----- > > From: rstofer > > To: > > Sent: Monday, April 21, 2003 9:07 PM > > Subject: [piclist] Re: Need help with PIC Macros > > > > > > > > Attached is the code we discussed. Thinking about it today I > have decided > > that since the A/D values are only used every 20 mS (by throttle > and > > steering code) it would be better to pull that code out of the > interrupt > > routine and use two tasks separated in time by a couple of mS. > > > > The first task would grab the previous conversion, update the > channel > > selection and exit. A couple of mS later the second task would > start the > > conversion. This gives plenty of time for settling after channel > selection > > and the actual conversion. It also reduces the amount of > overhead in the > > interrupt routine. > > > > Work in progress but maybe there are some tidbits. > > > > Yahoo! Groups Sponsor > > > > > > > > > > > > to unsubscribe, go to http://www.yahoogroups.com and follow the > instructions > > > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service. > Yahoo! Groups Sponsor > to unsubscribe, go to http://www.yahoogroups.com and follow the instructions > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. |
Reply by ●April 22, 20032003-04-22
I like the 16F876 and 877 too.
If you really like the 18-pin format of the
16F628, the 16F819 (I think I got the # right) trades the USART for 5-pins A/D
converter, but is otherwise very similar to the 16F628. It has the new
"internal software osc block" of the 16F628A too.
Microchip doesn't recommend using the
USART with the internal osc anyway, so the 16F819 may become the low-end chip of
choice for minimal component work.
|
|
Reply by ●April 22, 20032003-04-22
Message
> Microchip doesn't recommend
using the USART with the internal osc anyway, so the 16F819 may become the
low-end chip of choice for minimal component work.
Don't forget the 16F630/676 and 12F629/6575.
Wouter van Ooijen |
Reply by ●April 23, 20032003-04-23
On Tue, 22 Apr 2003, Bert Drake wrote: > Microchip doesn't recommend using the USART with the internal osc anyway, so the 16F819 may become the low-end chip of choice for minimal component work. Microchip doesn't recomand many other usefull things like a small overclocking or using internal osc with usart. However for the 16F628 the USART is working perfect up to 2400bps. In 12F675 the oscal feature is allowing up to 4800bps with internal oscillator (and software usart, of course). Vasile |
Reply by ●April 23, 20032003-04-23
> However
for the 16F628 the USART is working perfect up to 2400bps.
Good to
know! I've never tried the USART without a xtal, since
an
xtal and caps
is only $1.50 or so more, and pretty small, but it is good to know it WILL work
if you want to use it. I've heard the 16F628A (or some other newer
chip) will have a higher precision more stable internal osc that should
help. Anyone have any experience with that?
|
|
Reply by ●April 23, 20032003-04-23
Unless you are short of pins, the ceramic resonator is a no effort way of clocking the PIC. See www.digikey.com for X909-ZD - a 20 MHz ceramic resonator with built in capacitors for $0.81 qty 1. These are accurate to 0.5% (xtal is 0.0004%, often far better - 1000 times more accurate) but unless timing is critical it doesn't matter. --- In , "Bert Drake" <Bert@D...> wrote: > > However for the 16F628 the USART is working perfect up to 2400bps. > > Good to know! I've never tried the USART without a xtal, since an > xtal and caps is only $1.50 or so more, and pretty small, but it is good to know it WILL work if you want to use it. I've heard the 16F628A (or some other newer chip) will have a higher precision more stable internal osc that should help. Anyone have any experience with that? > > ----- Original Message ----- > From: Vasile Surducan > To: > Sent: Wednesday, April 23, 2003 1:22 AM > Subject: Re: [piclist] Re: Need help with PIC Macros > On Tue, 22 Apr 2003, Bert Drake wrote: > > > Microchip doesn't recommend using the USART with the internal osc anyway, > so the 16F819 may become the low-end chip of choice for minimal component work. > > Microchip doesn't recomand many other usefull things like a small > overclocking or using internal osc with usart. However for the 16F628 > the USART is working perfect up to 2400bps. > In 12F675 the oscal feature is allowing up to 4800bps with internal > oscillator (and software usart, of course). > Vasile > > Yahoo! Groups Sponsor > to unsubscribe, go to http://www.yahoogroups.com and follow the instructions > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. |