10th Oct 2020, 9:46 am | #121 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,567
|
Re: PIC 14 Karen
Morning Tim, how is your head today? Don't try any sudden moves
Karen's decision to revert to the 877 for the VDU means that I now only have one 16F877 immediately to hand and possibly another at work, but in any case the fact that you have a working 'Phil' which you can drop a programmed chip into for test purposes probably makes you a better chip source for Slothie, should he decide he needs one. My own existing PIC14 uses a little PCB with a surface-mount 877 on it, so I can't try any DIP device which I programme by putting it in mine (I haven't yet built my 'Phil' PIC14). |
10th Oct 2020, 9:54 am | #122 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
Well I think I've discovered the source of my problems!
I spent last night reading the PIC16F877A data sheet (excellent getting to sleep material!) and discovered an interesting bit in the ICSP notes: "2: While in Low-Voltage ICSP mode, the RB3 pin can no longer be used as a general purpose I/O pin. 3: When using Low-Voltage ICSP Programming (LVP) and the pull-ups on PORTB are enabled, bit 3 in the TRISB register must be cleared to disable the pull-up on RB3 and ensure the proper operation of the device. 4: RB3 should not be allowed to float if LVP is enabled. An external pull-down device should be used to default the device to normal operating mode. If RB3 floats high, the PIC16F87XA device will enter Programming mode." RB3 is connected to one of the anodes of the LED display and would be floating at power up, and it seems probable that the device is just floating its way into programming mode rather than operating. In other words to operate on the PIC14 the PIC must be programmed with a high voltage programmer, with the LVP option switched off (which I believe the config in the hex file does, as the programming software complains that it is and resets it!) I'm inclined to just buy a PICKIT 3 since they are so cheap and I want to play with the software on the PIC14 anyway. I notice that Microchip have announced a PICkit 4 but that just seems to be a rework to support the AVR devices since the Microchip/Atmel merge. |
10th Oct 2020, 10:08 am | #123 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,567
|
Re: PIC 14 Karen
While the Pickit2 and Pickit3 were good bits of gear there seems to be a degree of online dissatisfaction with the Pickit 4 - not sure exactly why - so I would avoid that until they get the issues ironed out. At the moment my choice would be a Pk3 - even a clone - rather than a real Pk4 as they are not especially cheap either.
|
10th Oct 2020, 10:37 am | #124 | |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
Quote:
While I'm doing that I can remove and resolder the power LED that I seem to have put in backwards! |
|
10th Oct 2020, 12:46 pm | #125 | |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: PIC 14 Karen
Quote:
Happy to do a chip if requested - I think I said elsewhere I ended up with a large number when I purchased which helps with the VDU reversion to the same Chip. |
|
13th Oct 2020, 5:41 pm | #126 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
Yay!
Thanks to the generous donation of a PIC chip from Mr Timbucus my PIC14 is working. The problem all along was, as I suspected, because of the low voltage programming. I checked the chip again and the Arduino programmer did program the chip, but in the case of the PIC14 you need to use a High Voltage programmer because the PIC14 uses the RB4 pin. Now I just need to remember how to ptogram SC/MP again..... |
13th Oct 2020, 8:08 pm | #127 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: PIC 14 Karen
Excellent news glad it worked Slothie - I love the varied colour buttons - I had a bag of 100 black so that is what went on mine...
|
16th Oct 2020, 3:26 pm | #128 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: PIC 14 Karen
YAPIC14
Yet Another PIC14 Not fully populated yet but enough to play. To be honest I've not yet worked out what a lot of it is for, for example Q9 and the all the sockets? I need to RTFM Next job - my tired old eyes need a keyboard overlay Many thanks to Karen and to Phil for the PCB, makes it so much easier than hand wiring. PICL next, found some board, a spare FTDI and a 6264, blown the 877... Cheers Phil Last edited by Phil__G; 16th Oct 2020 at 3:54 pm. |
16th Oct 2020, 3:54 pm | #129 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,567
|
Re: PIC 14 Karen
Hmm, I seem to be the only person near Earth who doesn't have one of these working now (although I do have an earlier PIC14 build).
|
16th Oct 2020, 3:57 pm | #130 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: PIC 14 Karen
Tidied the display, but ran out of edit-window
Used these displays and 2N3904s without any parallel caps, and these buttons Cheers Phil Last edited by Phil__G; 16th Oct 2020 at 4:03 pm. |
16th Oct 2020, 4:03 pm | #131 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
|
16th Oct 2020, 4:55 pm | #132 |
Dekatron
Join Date: Aug 2011
Location: Newcastle, Tyne and Wear, UK.
Posts: 11,567
|
Re: PIC 14 Karen
By the way, has anyone heard from Philoupat83 (the creator of these PIC14 PCBs) lately?
|
16th Oct 2020, 5:02 pm | #133 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
|
16th Oct 2020, 5:12 pm | #134 | |
Octode
Join Date: Mar 2020
Location: Kitchener, Ontario, Canada
Posts: 1,297
|
Re: PIC 14 Karen
Quote:
Perhaps if we mention his name three times he will appear. |
|
16th Oct 2020, 5:50 pm | #135 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: PIC 14 Karen
Its 3 weeks since he sent my PCB, maybe he found a way to take a holiday?
I did a little help-file for the display: |
16th Oct 2020, 6:41 pm | #136 |
Octode
Join Date: Mar 2011
Location: North Yorkshire, UK.
Posts: 1,118
|
Re: PIC 14 Karen
This makes it so much easier to key!
Quickie overlay, Visio & jpg files attached, print actual size from the zipped file. Dont print the displayed overlay cos the forum resizes it Mines backed with double-sided tape, then stuck onto the keys. It flexes enough not to need cut-outs. Its not obvious but the display is supposed to say 'overlay' Last edited by Phil__G; 16th Oct 2020 at 7:01 pm. |
16th Oct 2020, 6:41 pm | #137 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: PIC 14 Karen
|
19th Oct 2020, 5:49 pm | #138 |
Triode
Join Date: Apr 2020
Location: Newtownabbey, County Antrim, Northern Ireland, UK.
Posts: 16
|
Re: PIC 14 Karen
Hi Karen,
Hope you are keeping well. Its been a while since I last posted to the site but I've been busy with new grandchildren etc.. I've added more programs to the flash memory but not all of them as some require hardware etc.. for it to work. See my list in the attached zip file. I've also been working on more software and hardware upgrades to the PIC-14 that might be of interest to yourself and others. I will attach a number of files this time with more detail of these upgrades. 1. I have activated the internal SPI comms on RC3-5 and connected the port expander MCP23S017 that works really well with the 16F876 PIC, given it have no ports available for use as GPIO's. it works fine for the 877 as well, but this will allow any SPI devices out there to be added to the PIC which might be of interest to others. I have attached a schematic of the port expansion connections to the PIC-14. There is some example programs in flash memory to try out as well using 3 new instructions that read and write specifically to the port Expander. I've also added one generic R/W instruction that can be used to program any SPI device that's connected to the PIC-14. 2. I've added a new flash memory viewer that works almost exactly like the rom monitor we are all used to, but the program can view all 4K (16 pages of 256 bytes) of programs in flash memory listed in the zip file attached and it sends the retrieved flash memory bytes out to the port expander, if connected, as you increment through each program. 3. I've also added the option to use 96 ram registers that were not being used and added a number of instructions that make it easy to use them as variables as there is no relative addressing calculations to make when using them in your program. 4. There is now 42 extra instructions that are not part of the normal instruction set. I've added a word document to cover how each works with example code snippets to try out 5. I made a new message program that displays 256 bytes of message with a simple example added to the flash memory to try out. It also sends the message out to the SPI port expander if its connected. see attached zip file. 6. I've added in a keyboard program I made some time ago that extracts the essence of how the rom monitor captures a key press and a key release and creates a unique byte that identifies what key was pressed. You can use this in your own programs where key presses might be useful to drive different processes or use different keys to communicate/deliver data from different SPI devices. It also sends display data out to the port expander, if connected. See attached zip file for more detail. I think I'm now out of upgrades and ideas, but I hope the SPI comms might stir some interest and I might look at what other devices are out there myself. Regards George |
20th Oct 2020, 3:46 pm | #139 |
Octode
Join Date: Mar 2019
Location: Barry, Vale of Glamorgan, Wales, UK.
Posts: 1,364
|
Re: PIC 14 Karen
Cool - another thing to play with - thanks.
|
20th Oct 2020, 4:05 pm | #140 |
Octode
Join Date: Apr 2018
Location: Newbury, Berkshire, UK.
Posts: 1,287
|
Re: PIC 14 Karen
I've been having problems assembling Karens code with MPLABX 5.35. I get the error:
Code:
Error[151] /home/ian/MPLABXProjects/PIC14_IKR.X/pic14.asm 409 : Operand contains unresolvable labels or is too complex Code:
409 IF (HIGH($) != HIGH($+D'16')) 410 ERROR "PAGING ERROR" 411 END |