I agree with mpgmike, 100%.
Really, the only three PBP commands I can think of that targets hardware peripherals are ADCIN, HPWM and HSERxxx (well, the EEPROM and READ/WRITECODE too of course). For everything else (SPI, I2C, DAC, CLC, CWG, CMP, NCO, FVR, DSM, SMT, ZCD, DMA and so on), you need to twiddle the registers yourself - it's always been that way and I bet to say it's not going to change. That's NOT to say you can't USE those peripherals, in fact it's quite the opposite. Most of the time it's only a couple of registers while in some cases it's more complicated (like with built in CAN).
Take the DAC in the Q43 for example, there's one configuration register and one data register. Set the config register once according to your preferences (or change it at will) and then write to the data register ( DAC1DTL = xxx ) whenever you want the output to change. You really don't need a DACOUT command for that now, do you?
Peripherals today are a lot more advanced/capable than before, take the Q43 UART for example, doing DALI and DMX or the new(ish) ADCC module. Even if ADCIN supports it in, like, legacy mode you're not taking advantage of the peripherals capabilites by just using ADCIN. It's not realistic to expect PBP to have "commands" for every permutation of every peripheral in every PIC. Instead, try to write reusable code and supbroutines FOR the peripherals USING the basic PBP commands.
With that said, the HSERxxx commands are just damn convenient and I certainly wouldn't mind having built in support for more that two :-) A "trick" I've used is to use the two UARTS supported by HSERxxx and multiplex them with the PPS feature. This isn't always applicable of course.
The thing is that you HAVE to allow yourself time. If you expect to sit down and have everything working in 30 minutes you're either extremely good or extremely naive.
Bookmarks