The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"
Showing posts with label MCU. Show all posts
Showing posts with label MCU. Show all posts

20 January 2020

Upgrading my design tools for PIC projects

2020 has just begun, and here is my new year's  resolution, which I have already completed !
For my embedded control projects it was time to standardise on PIC microcontrollers, ( e.g., the PIC16F188** family ), belonging to a newer generation than some of those I had previously been using. PIC development in recent years has now led to devices typically having larger memory, supporting higher clock speeds, with more peripherals including core independent peripherals, and new features, such as peripheral pin select, device information area, configurable logic cell, integrated temperature sensors to name a few.

The new development platform for my embedded control projects
As result I have had to upgrade my hardware tools as well for compatibility; the most significant change being the MicroChip "Snap" programmer/debugger, to replace my obsolete ICD2, and a different prototyping board, which I could call MyDev3, ( see post dated 2 November 2010 ). The MCU featured in the image is a 40 pin 8-bit device, MicroChip PIC part PIC16F18875/P. ( Click on image to zoom ).
All is working fine. The PIC was a new unused blank device and successfully programed with my TEMPSENS-OLED firmware. ( See post dated 6 October 2019 ).
MCU = MicroController Unit, PIC = Programmable Integrated Circuit from MicroChip Inc.


  

06 October 2019

Digital Temperature Sensor with OLED Display

Temperature Sensor - MCU board & OLED display
Serial terminal window showing count & raw adc samples
I was working on this project in April but forgot to post it until now when I was thinking about a future project using this microcontroller unit ( MCU ) board and OLED display; but more about that later.
This digital "thermometer" uses the temperature sensor and 2 Analogue to Digital Converter ( ADC ) channels, integrated on the MCU board. I am using one ADC in averaging mode for temperature. Raw temperature data are sampled every 1.875s and the parsed result of the average of a count of 8 consecutive samples is displayed. Voltage is sampled by the second ADC in basic mode every 1.875s and displayed. This is not the voltage of the batteries shown in the image but actually the supply voltage to the MCU and OLED display. I also send the count number and raw ADC measurements using a serial interface to a pc running a terminal program.
The display shows what the device is, the version of the TEMPSENS-OLED firmware installed, temperature ( in degrees C & F ) with resolution 0.01 degrees, and "battery" voltage with resolution 0.001V. Of course I can change any of the above settings and parameters in my firmware.
In my recent projects I have only learnt the basics, ( such as displaying plain text ), of using an OLED display, and not attempted any scrolling, graphics or animation.
For the next project I am considering using the MCU and OLED display with a GPS receiver module. These are available on a well known online shopping site for as little as 4.26GBP including antenna. I shall also be buying a slightly larger 64 x 128px two colour OLED display to show altitude and position; the latter with possibly 1cm accuracy !
( Click on images to zoom in ).

28 January 2012

Gradually moving forward

Having a lot of spare time recently has enabled me to progress with some unfinished PIC MCU related activities. For the first time I have been writing code in 'C' language and programming PIC MCUs using Microchip's MPLABX IDE and ICD3. So far I can write characters to a display, and also detect when any button on a particular row of a keypad has been pushed; all quite encouraging. But I still have much more programming to do in order to complete even the quite basic operation of keying-in and displaying numerical data.
I have also been experimenting with software, ( assembly language in this case ), to detect disconnecting the power source from a PIC microcontroller, ( PIC18LF4455 ). A variable low voltage power supply would be very useful here.
And finally, from a most unexpected source, I have obtained cut and engraved black plexi front and rear panels for the frequency synthesiser enclosure.

14 September 2011

MyDev2 enhanced

Schematic - note Vcc connection depends on usb-powered or self-powered application
I have upgraded to version 3 my PIC MCU development platform, MyDev2, ( first posted on November 2nd, 2010 ), with the addition of pull-down resistors R25-R28 for the keypad rows connections now that I have decided on the method I will use in coding the operation of the keypad and the interfacing required to the microcontroller. I have already started writing the code in 'C' programming language, instead of the 'Assembly' language which I have used for all my PIC projects until now. The keypad will be a 'telephone' style 4 row x 3 column, 0-9, # and * type.
I have also fitted a new microcontroller type, Microchip part PIC18LF4455-I/P, which, as well as being a few cents cheaper than the original PIC18F4550 and PIC18F4685, has an extended operating voltage range, ( denoted by the 'L' in the part number ), down to +2V, as I want to experiment with coding the detection of switching off the power !

12 July 2011

Then there were four

From time to time since the last post, ( 16 June ), I have been populating three more circuit boards; four are now complete. This is not quite the rate of 3 per week which should be achievable, single-handed; what an efficient production line that would be !
During this activity my soldering skills working with surface mount components, some minute, have quickly improved. Surprisingly, I didn't find the 44 pin microcontroller chip to be the most difficult to mount.
Now I will progress further with the case. I have already finished the technical drawings for the top, base, front and rear panels ready for their fabrication. And today a local firm precisely cut the extruded, anodised aluminium sides to the final length.

16 June 2011

Densely populated

A new batch of Analog Devices synthesiser chips has arrived, enabling me to finish populating one circuit board with components. I programmed the PIC MCU via the bootloader with my latest v2.00 code and, after powering up the board, all seems to be working fine.

02 November 2010

MyDev2 replaces MyDev1

PIC18F4550 version
PIC18F4685 version
Schematic - note Vcc connection depends on usb-powered or self-powered application
Development boards for microcontrollers are essential for debugging code and checking hardware peripherals before committing to the final build-configuration.My first microcontroller development board, which I called "MyDev1", has served me quite well; see 25th January. It is a typical, solderless, experimenting board; component leads are a push-fit into the holes. Its limitations, however, began to become apparent; noisy, intermittent connections, lack of flexibility and a real nightmare if I had ever attempted to use it with 40 or even 28 pin microcontrollers and interfacing with several hardware peripherals at once. Having unreliable connections is a really bad situation when the microcontroller is waiting, or looking, for changes.It was therefore time to upgrade to a better system; so I have produced "MyDev2". Now it is much easier to reconfigure for different peripherals, e.g. display, keypad, rotary encoder, comms ports, and to check their operation. Of course, I haven't omitted the LEDs, and "MyDev2" has many, ( different colours for different ports ), as it is always nice to see pretty lights as a visual indication of I/O port output state ! I could not avoid solderless connections entirely; but those are of a high reliability using good quality pin-headers.
"MyDev2" connects to the Microchip ICD2, ( In-Circuit Debugger No.2 ), for programming and debugging operations, thereby replacing my original home-made programmer, ( see 25th Jan, 8:06PM, purple box ).
Using a development board I was easily able to change between two mechanical rotary shaft encoders, ( control with knob ), from different manufacturers, choose the more appropriate one for my final application, and 'fine-tune' the PIC code to suit.
Incidentally, the microcontrollers featured in the pictures above are 40 pin Microchip parts, ( lower ) type PIC18F4685-E/P, and ( upper ) type PIC18F4550-I/P which incorporates a USB interface.