-
PIC16F18345 EVB and IDE
03/20/2021 at 17:41 • 0 commentsThe PIC16F18345 evaluation board (DM164141) is a MPLAB Xpress evaluation board. I bought the 20 pin version since it was the smallest and cheapest option. Several distributors sell the EVB
At first I thought of using a Linux toolchain to program the part, but some of the tools were a bit out of date. I decided to go with the Linux version of Microchip MPLAB X IDE. This is proprietary software, but it is offered free of charge. Microchip has decent installation instructions. Be aware, it's a huge program and it runs in a specific Java version. It worked on my old workbench laptop, but it is a VERY busy user interface. This took some time to understand and use. This ain't Arduino. It's a professional IDE with half the features disabled in the free version. It suffers from cluttered menus. Some menus did not fit on my crummy laptop screen.
The MPLAB Configurator is really nice and useful. It's a separate installation, but it's worthwhile. It's a GUI tool to set up all the system and peripheral options needed for a project. Again, the user interface was designed for higher screen resolution than my laptop. The configurator will generate header and C files that get included in the project. This saved a lot of time reading about peripheral register bits.
The EVB connects by USB and acts like a tiny FAT partition. The command line or file manager can be used to copy the .hex file. The EVB has a programmer section and a target section. Copying the file is all that was needed to program the target. This is very convenient.
I did have a problem programming the target MCU with the default 3.3V setting. 5V is working fine. Maybe this EVB has some issue. I've asked Microchip for technical help.
-
initial success
03/19/2021 at 02:13 • 0 commentsThe project log is written backwards. After some initial success, the development will be described. In short, it worked better than expected.
- A PIC16F18345 EVB is configured to generate 400-500kHz using the NCO peripheral
- Sweep is generated by a for loop and updating the NCO registers
- Internal HF osc is configured for 32 MHz. Supply is 5V from USB port.
- Frequency output is on RC0. This is turned on and off for each sweep.
- A trigger and marker signal is generated on RC1. The marker goes low when output is between 453 and 457 kHz.
- The 5V frequency output is attenuated and filtered by a simple R-C network and pot. Not very good, but it did work
- The signal is tied to a vacuum tube radio IF strip. It's coupled into the signal grid of the converter tube.
- IF output is at the detector, where the AVC voltage is typically found.
- IF output is AC coupled into the scope channel.
- The other scope channel is connected to the marker at RC1.
- The scope display is very stable.
- The IF transformers could be adjusted to get a nice peak centered around the marker notch.
The code was done in MPLAB X. It's ugly. I'll clean it up a bit and post it later.