tterev3's PIC quickstart guide

Where do I find those files? neither are in xc8>v1.32>include. edit: I went to add file and typed in those 2 files (selecting the entire XC8 folder as the directory) and it looked like it added them (listed under Other Files) but didnt work:

Build C:\Users\Dan\Documents\MPLAB\D10\D10 for device 12F1822 Using driver C:\Program Files\Microchip\xc8\v1.32\bin\xc8.exe 

Make: The target "C:\Users\Dan\Documents\MPLAB\D10\D10 v1.p1" is out of date.
Executing: "C:\Program Files\Microchip\xc8\v1.32\bin\xc8.exe" -C "C:\Users\Dan\Documents\MPLAB\D10\D10 v1.ASM" -q --chip=12F1822 -P --runtime=default,+clear,+init,-keep,+osccal,-download,-resetbits,-stackcall,-config,+clib,+plib --opt=default,+asm,-debug,-speed,+space,9 --warn=0 -N255 -D__DEBUG=1 -Bsmall --double=32 --float=32 --cp=16 --addrqual=ignore -g --asmlist "–errformat=Error [%n] %f; %l.%c %s" "–msgformat=Advisory[%n] %s" "–warnformat=Warning [%n] %f; %l.%c %s"
Error [141] C:\Users\Dan\Documents\MPLAB\D10\D10 v1.ASM; 5.24 can't open include file "p12F1822.inc": No such file or directory (908) exit status = 1 ********** Build failed! **********

They won’t be in the xc8 folder since we’re not using the compiler, they’ll be in the MPASM folder (the assembler)

Ok got the chip file but the instructions.inc file is not coming up (when I type it in it comes up but has “(file not found)” next to it in the list.

edit: also since I’m not using the compiler do I still push the same button? or do I need to start this whole project over without the XC8?

See my earlier post (#59)

Yes, same button

I can’t help but wonder if it’d be easier to just use a Makefile and a command line. GUI front-ends often seem harder somehow.

I’m looking forward to doing more firmware in the near future… and some reviews. I can almost see the light at the end of the tunnel; my 14-hour work days should be ending in about a week, I think.

Ok D/L’d it and added it to the same directory (MPASM Suite) then hit build and its still giving me an error but the file is there, I found it and selected it, not just typed the name in:

Make: The target "C:\Users\Dan\Documents\MPLAB\D10\D10 v1.p1" is out of date.
Executing: "C:\Program Files\Microchip\xc8\v1.32\bin\xc8.exe" -C "C:\Users\Dan\Documents\MPLAB\D10\D10 v1.ASM" -q --chip=12F1822 -P --runtime=default --opt=default -N-1 -D__DEBUG=1 -g --asmlist "--errformat=Error   [%n] %f; %l.%c %s" "--msgformat=Advisory[%n] %s" "--warnformat=Warning [%n] %f; %l.%c %s" 
Error   [141] C:\Users\Dan\Documents\MPLAB\D10\D10 v1.ASM; 5.24 can't open include file "p12F1822.inc": No such file or directory
(908) exit status = 1

Are you sure you have the .inc and not the .h?

yes sir, sent you a screen shot via email

If I understand correctly, .h is a traditional C header file with definitions for linking but no function bodies, while the .inc is for code to include inline in the main source file(s)? It has been like 15 years since I used C on a regular basis so I’m a bit rusty, and I always used multiple object files instead of inlining library functions into the primary source file.

It might also be worth double-checking the punctuation used on the includes… <> tells it to search the system devel paths, while “” tells it to search the same directory as the current file. Global vs local. Can’t include a local file with <>’s.

I completely agree for a one-off, but in this case we’re trying to teach Mr Killer to fish since he’s going to be programming his own stuff pretty soon

Hey tterev3 (and anyone else)- got another crazy issue, not saying it’s perminate (hoping the opposite) but I seemed to have bricked my clone PK3 2 days ago and I can not recover, even tried an old computer (that always worked)…

So the story is, I was doing some code work with the programmer hooked up and wired to a driver, I was flashing and testing and flashing and testing. My computer was giving me a “needs to restart” prompt that I kept postponing, I didn’t realize the button I pressed that last time to clear it was just that- an “ok” button, not a postpone. After 5 minutes my computer forced a restart (and installed some pending updated), I also lost all my code work but oh well. Once it finally came back up I wasn’t able to connect to the chip, I continously get the “incorrect device signature” warning.

I was working in MPLAX 8.92, I have since tried downloading X 2.2, neither can communicate with the chip, on X there is an override for that error so I tried that and it can’t communicate still.

I have downloaded the newest PK3 FW however in my device manager PK3 is only showing up as a random USB device and the listed drivers are simply “Microsoft” (but they do show UTD).

I guess my question is- what does your PK3’s show up as in device manager?

Note I’ve tried no fewer than 10, brand new- straight out of the tape 12F617’s. I was somewhat concerned about that because I got that strip of 50 617’s from aliexpress (but I’ve already used around a dozen of those without issue) so I then tried some 10F322’s new out of the strip that came from digikey, still the same thing.

I have also hooked to the chip several different ways, using an SOIC clip, solderong the chip on a board and soldering leads to programming pads on it, even solderong directly to the chip hanging in the air.

I have also tried with and without a .1uf cap from VSS-VDD (can you tell I’ve been googling).

Note2- I physically took my PK3 apart to verify it didn’t suffer from the clone FDTI Chip issue since it happened right after a windows update, it doesn’t, it uses some microchip part for USB data handling. All parts on the board appear to be legit, 2 main microchip chip’s and an Atmel (plus an AO FET and several more). The only thing that gives away its a clone is the lack of a microchip logo on the case.