Thursday, November 8, 2012

Decisions, Decisions

Although I view the choice of build/buy as somewhat open, we have been proceeding on the assumption that we would build a dsPIC-EL, and that it would involve some sort of 40-pin dsPIC30F.

We initially chose the dsPIC30F4011for a number of reasons:
  • It had the largest memory available in a DIP package
  • It had a complete set of peripherals, especially including a large number of output compare ports which can be used for a flexible PWM
  • It had a fast A/D

 But as we continue to look into the experiments we would like to run, we see an issue - the I2C and SPI pins are shared with the programmer.


This means that we either cannot use the debugger with I2C, or we need to provide some sort of jumpering mechanism or an additional programming connector in order to do in-circuit debugging.  Even if we provide the extra hardware, its use would be clumsy at best.

It would be good to have a lesson on I2C in the first place, and even better, the addition of some sort of I2C DAC might make for some interesting digital filtering experiments.  SPI is used for SD cards, so that also holds some promise for logging experiments.

The dsPIC30F4013 does not have this problem.


However, it has a slower (although higher resolution) A/D.   For the kinds of use we envision, the higher resolution isn't much of an advantage, and it takes very careful hardware design to effectively use all the resolution, so that A/D isn't much of an advantage.  Using the higher speed of the 4011's A/D does take a little care in the software, but it really isn't so burdensome.

The 4013 has the same memory as the 4011, and other than the A/D, a very similar set of peripherals.   One annoying feature; on the DIP dsPICs, there are no ports with all the pins implemented, and in the case of the 4013, PORTB is the only one with at least 8 contiguous bits.  Of course, the programming pins have to be on PORTB making it difficult to use all 8 bits.

However, there are no plans to actually need 8 bits of a port, even though it seems as if that is something almost necessary.  It would be nice to use an 8-bit interface for the LCD, thus simplifying the LCD code, but there is really no advantage besides a few lines of code. 

So, still more stuff to think about.

1 comment:

  1. Another delta for the 4013 - it only has one breakpoint! This means that if you use that one breakpoint, you can't single step. Lots and lots of times you want to run to a breakpoint, and then single step through the next few instructions. On the 4013, you need to remember to disable the breakpoint before you step.

    ReplyDelete