# Having Difficulty selecting PIC micro part

#### Bob D.

##### New Member
I can't seem to see the forest for the trees. There are so many PIC parts!

My project needs:
One 16 bit timer that can count at a 5.5 MHz rate. (Can the overflow be counted to provide a third byte of resolution?)
One other timer as a 1 sec time base.
A D/A converter, 8 bits preferred but 5 bits would do.
Must be a DIP package.
Don't need a lot of I/O pins, would like to keep the pin count to 28 or below.
Only need 3 general purpose I/O pins.

I see a lot of parts that would fit the bill, but I can't find any debug/development boards that support the parts that have D/A converters!
Project is a VFO stabilizer for a Heathkit HW101 transceiver. I know there are already designs out there, by I have a few special requirements.

Bob D.

#### Pommie

##### Well-Known Member
The 16F18854 I suggested on your other thread fits all your requirements. The debug/development circuitry is built into the chip. If you wish to go to an 18 series then the 18F27Q10 fits your requirements and has 128k flash, 3.5k ram and runs at 64MHz.

Have you decided on which programmer/debugger interface you'll use? I currently use a PicKit4.

Mike.

#### Bob D.

##### New Member
Hi Mike. Thanks for the advice. I missed the PicKit4 somehow. That's what I'll go with and the 18F27Q10. I remember the debuggers we used at work back in the stone age of micros. The manufacture would make a special device that could be configured to emulate their entire micro family. The emulators that used these devices were quit expensive.

#### Pommie

##### Well-Known Member
Nice choice. The 18F chip has three hardware breakpoints. Amazing what you get now for a little more than a dollar and a half.

Mike.

#### Nigel Goodwin

##### Super Moderator
I can't seem to see the forest for the trees. There are so many PIC parts!

My project needs:
One 16 bit timer that can count at a 5.5 MHz rate. (Can the overflow be counted to provide a third byte of resolution?)

Check out the 18F27K42, a 28 pin DIP part - among many new enhanced PIC's it has a 24 bit SMT timer, with a multitude of functions. It also has a 5 bit D2A, and masses of memory.

#### Pommie

##### Well-Known Member
it has a 24 bit SMT timer
Hadn't come across that before. Looks very useful. Bob, check out section 25 (P. 362) of the datasheet.

Mike.

#### Nigel Goodwin

##### Super Moderator
Hadn't come across that before. Looks very useful. Bob, check out section 25 (P. 362) of the datasheet.

It was why I moved to the two 28 pin chips I mentioned, plus they have selectable schmitt inputs.

#### Ian Rogers

##### User Extraordinaire
Forum Supporter
Most pic's can count up to 5.5MHz easy.. The timer circuitry can count an external signal much faster than the osc..

I think there is a 25Mhz frequency counter running on a 4Mhz pic16 on the web somewhere.. As your demands are quite low, a 8 bit dac ladder can be placed on a single port..

#### Nigel Goodwin

##### Super Moderator
Most pic's can count up to 5.5MHz easy.. The timer circuitry can count an external signal much faster than the osc..

I think there is a 25Mhz frequency counter running on a 4Mhz pic16 on the web somewhere.. As your demands are quite low, a 8 bit dac ladder can be placed on a single port..

No, it was 50+MHz, and was a VERY, VERY old MicroChip application note - the original uses 7 segment LED's for a display, but later on people modified the original design to use a character LCD display instead. I even have one somewhere that I bought as a kit - and amazingly I just went straight to it

I bought it from Weeder Technologies in Florida, back in March 2000, but it was already fairly old then - mine uses a 16C54 OTP device - I'm not even sure if the 16C84 (the first EEPROM based PIC) was even out when the application note was first published.

The bare PCB was $8.00, the parts$19.50 and the 16x1 LCD was $18.50 - and shipping$10.00 - how prices have dropped since then.

There is a 16F84 version as well - and of course pretty well any more modern PIC could be used.

Just found the original application note:

#### augustinetez

##### Active Member
I think there is a 25Mhz frequency counter running on a 4Mhz pic16 on the web somewhere.. As your demands are quite low, a 8 bit dac ladder can be placed on a single port..
I've got two homemade, 16F628A based frequency counters, one counts to 50MHz (limited by the input stage) and another identical except for the input stage counts to 70MHz.

The input stages are both single transistor stages direct in to the PIC.

So even the most basic PIC can do quite a respectable frequency range without any special tricks.

#### Nigel Goodwin

##### Super Moderator
I've got two homemade, 16F628A based frequency counters, one counts to 50MHz (limited by the input stage) and another identical except for the input stage counts to 70MHz.

The input stages are both single transistor stages direct in to the PIC.

So even the most basic PIC can do quite a respectable frequency range without any special tricks.

To be fair, it's a fairly 'special trick' the way they work - using a cunning way to read the register that can't be read I was always impressed by that.

#### rjenkinsgb

##### Well-Known Member
One 16 bit timer that can count at a 5.5 MHz rate. (Can the overflow be counted to provide a third byte of resolution?)

If you want more than 16 bits, some devices can cascade the counters in hardware to give 32 bits.

The DSPIC33EP series can do that and likely many others.

#### Nigel Goodwin

##### Super Moderator
If you want more than 16 bits, some devices can cascade the counters in hardware to give 32 bits.

The DSPIC33EP series can do that and likely many others.

Interesting, but the 24 bit SMT timer in new devices pretty well covers that, and also removes the 'special trick' requirement of the ancient original application note. I presume there would be no such requirement on the 33EP series either?.

#### rjenkinsgb

##### Well-Known Member
I presume there would be no such requirement on the 33EP series either?.
Yes, the timer registers can be read directly.

The SMT module looks to be an interesting device with a lot of possibilities!

#### Nigel Goodwin

##### Super Moderator
Yes, the timer registers can be read directly.

The SMT module looks to be an interesting device with a lot of possibilities!

Like many PIC peripherals, it seems to have far too many

Even deciding which mode you need isn't easy.

It works perfectly for my application though (timing incoming pulses over a wide range), previously I was using a 16 bit timer, and using it's overflow to create a third byte of data - now the SMT does it all in one go, counts both mark, space, and both with 24 bit resolution, and generates interrupts after each.

#### rjenkinsgb

##### Well-Known Member
Like many PIC peripherals, it seems to have far too many

Even deciding which mode you need isn't easy.

Just have a look at the "Peripheral trigger generator" module in the DSPIC33EP etc. - that's mindblowing, almost like a PLC state machine within the MPU & it can cross-link multiple other peripherals without CPU intervention, if you can figure out how to program it!

Replies
2
Views
2K
Replies
8
Views
1K
Replies
7
Views
3K
Replies
6
Views
1K
Replies
2
Views
1K