Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

PIC16F628A Simon Says Game

Status
Not open for further replies.
You need to compile the asm code into a hex file which then gets loaded onto the pic. You can use MPLab to do this.

Update: Why not just take the .hex file from the site?
 
Yes I saw that but would I save it as a .hex file and import to chip?
 
This is what I got when I programmed it. I trust it will work?

Code:
MPLAB ICD 2 Ready
Programming Target...
...Validating configuration fields
ICDWarn0033: MPLAB ICD 2 does not support programming this device if both the internal oscillator and internal MCLR are selected.  You may continue programming, but you are encouraged to cancel, reconfigure your device, and try again.
...Erasing Part
...Programming Program Memory (0x0 - 0x28F)
Verifying...
...Program Memory
...Verify Succeeded
Programming Configuration Bits
.. Config Memory
Verifying configuration memory...
...Verify Succeeded
...Programming succeeded
03-Feb-2008, 16:14:12

MPLAB ICD 2 Ready
 
You should heed that warning, you may not be able to reprogram the PIC if you don't.
As long as it's the exact same PIC and the same target schematic it should work fine.

PS I looked at the schematic, and there was no need to force MCLR_OFF as he's tied MCLR to VDD.
PPS a 4.5V (3xAA) supply would be much easier to build than his switching design.**broken link removed**
 
Last edited:
I erased the PIC and programmed it, so I guess it works?
 
Before I build this thing, any important things to say?

what about the stuff in red? Should I build that too?
Does the code look ok?

Well I will let you know here in one moment how it turned out...
 
Actually I don't Know if I programmed it correctly. I copied the hex file and saved it as a hex file, but it still says it's a hex.txt file. Can you turn it into a hex so I don't kill the pic with random stuff?
 
I cannot get the asm file to work. I am getting 318 Errors when I cut and paste the code into MPLAB. How do I get it working. SKYPE?
 
blueroomelectronics said:
You should heed that warning, you may not be able to reprogram the PIC if you don't.

Actually not, the diagram is marked with MCLR not connected if you use a 16F628, although you obviously could connect it and modify CONFIG accordingly.
 
ok, I put the hex into MPLAB and saved it as a hex file. I then programmed the chip and I am hoping it will work.
 
ok here is what my screen looks like. Does everything look correct? I saved it as a hex file and It should work. I imported the hex file and pressed program. This is where I am at right now. I AM NOT USING THE ASM SO DON'T BOTHER WITH THAT.
 

Attachments

  • screen.JPG
    screen.JPG
    307.1 KB · Views: 408
Nigel Goodwin said:
Actually not, the diagram is marked with MCLR not connected if you use a 16F628, although you obviously could connect it and modify CONFIG accordingly.

I thought the red wire on RA5/MCLR meant it was connected.
 
Krumlink said:
ok here is what my screen looks like. Does everything look correct? I saved it as a hex file and It should work. I imported the hex file and pressed program. This is where I am at right now. I AM NOT USING THE ASM SO DON'T BOTHER WITH THAT.

Well I don't read hex. You could override the config settings, just pull down the config tab and uncheck the override. What PIC are you using?
 
Red means its not required. It just ties it high, so I don't see the point?

Anyways, should it work?
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top