The blog of a dedicated radio amateur and electronics enthusiast

"Having fun on the air and in the workshop - communicating and creating"

22 February 2011

Winter's icy grip

Cold air from Scandinavia brings freezing weather conditions to Poland with temperatures well below 0C. I recorded -16.5C overnight last night and -21C is forecast for tonight. Although today was clear and sunny the temperature was still only -10C to -12C. Sun illumination level was high today, making it possible to receive some nice images transmitted by the NOAA weather satellites. I received the one shown above from NOAA18 at 1131gmt on 137.9125MHz.

10 February 2011

Bootloader in action


After programming a boot-vector and boot-block into the PIC microcontroller's flash program memory, I used a bootloader to upload my application code to the PIC from the PC using its com port, the level converter, ( featured yesterday ), and the EUSART, ( enhanced universal synchronous asynchronous receiver transmitter ), connections on the PIC. The top picture shows all the project hardware, looking a bit untidy by now.
To check, I read back from the PIC to the bootloader the entire contents of program memory, ( actually also data eeprom and config ). The screen capture in the lower picture shows just the first portion of this, from address 0000hex to address 00DFhex. On looking at this I can see that the bootloader has highlighted the boot-vector code, at address 0000hex - 0003hex; the high priority interrupt vector and low priority interrupt vector are still at 0008hex - 000Bhex, and 0018hex - 001Bhex respectively. My PIC type, com port and speed are correctly declared in the bottom right corner. I notice that the time taken for the flash memory 'read' was 35 seconds. I'll configure com2 for a higher speed to reduce this, although I won't be reading memory very often. I recall that, earlier, 'writing' took only 4 seconds.(*)
It'll be interesting to use the bootloader for programming instead of the ICD2, which of course will still be essential for debugging.
All this has got me thinking about the download area on my eventual (?) website !
( My thanks to Microchip Technology Inc. for the freeware serial bootloader AN1310v1.04 )

* Update, 11 February : I subsequently changed the speed of com2 from 9600 to 115200 bits per second; now write and read times have been reduced to 0.942 and 2.975 seconds respectively.

08 February 2011

PC talks to PIC projects



Today I built a CMOS/TTL to RS-232 level converter using a Texas Instruments part, MAX232N, driver/receiver chip in a 16pin DIP package. Now, provided that the PIC is self-programmable, ( which indeed my PIC18F4550 is ), it will be possible to connect my PIC applications/firmware to a PC serial ( com ) port, or via a USB (*) adaptor.The purpose of this interface between PC and PIC is, ( after making a bootblock in the program memory ), to use a bootloader so that a PC can read, write, verify, modify etc the PIC's software; or software updates downloaded from the web can be installed by a user anywhere.
The schematic and track layout for a double-sided 2.1 x 1.6 inch circuit board show the MAX232 in a 16pin SOIC package.
(*) Although I am usually 'game' for a challenge, I have put on hold indefinately any of my attempts to make a USB interface.