Help for 16F690

Thread Starter

FroceMaster

Joined Jan 28, 2012
699
Hi.
Have this project i will do.
It's for counting rain,.

Have a 16F690 and a 20*2 LCD.

Need to bulid a clock, cause i need the midnight shift
Normal readout on display will be.
First line . " Total rain xxx mm".
Second line " Today xx mm"

When pressing SW1. ( Select button )
First press, change line 2 to "Monday xx mm"
next press change line 2 to "Sunday xx mm"
Next press change line 2 to "Saturday xx mm"
next press change line 2 to "Friday xx mm"
ect.

until day is -7 from today.
Next press will show on first line "Time of day ( TOD )"
Second line " Monday "
Next again will return to normal.
When nothing is pressed for 10 seconds, it also returns to normal....

SW2 is for rest of "total rain" need to ask for confirmation, sure you want to delete total ? Y/N.

SW3 - SW4 - SW5 can only be used when SW1 has ( TOD ) Selected.
SW3 is for adding 1 hour to TOD,
SW4 is for adding 1 minute to TOD.
SW5 is for day of week, rotate from monday to sunday,....

Hope you can follow me in what i am planng to do ??

I have never done a programming of a PIC.
Have done many windows programs.

Have a 16F690 and a PicKit 2 starter kit.
LCD is 20*2 https://www.elfaelektronik.dk/elfa3~dk_da/elfa/init.do?item=75-512-37
Can someone please help me getting startet,

Rgds
FroceMaster
 

nerdegutta

Joined Dec 15, 2009
2,684
You might want to draw your circuit first, and be sure that it works. Then you download MPLAB with Hi-tech C, or MikroC, and start programming.
 

t06afre

Joined May 11, 2009
5,934
You must allow your self some learning curve. Some of the things you plan to do is not on a beginner level. But you have a good toolbox in your current equipment. First decide what kind programming language you want to use C/Assembler/Basic. Then write a very simple program that turn on a LED. Then the next step would be to get that LED blinking.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
699
Well i have learn in school, and have work with it sometimes,
I build some small project mostly with logic 74 and Cmos 4000 circuits.
But when i show you guys the layout for this i logic circiuts, you all say i should use microcontroller, it was so simpel to build.
 

t06afre

Joined May 11, 2009
5,934
Well i have learn in school, and have work with it sometimes,
I build some small project mostly with logic 74 and Cmos 4000 circuits.
But when i show you guys the layout for this i logic circiuts, you all say i should use microcontroller, it was so simpel to build.
I remember that rain gauge circuit. And yes building with discrete logic would have been a impracticable task. Now you are equipped with a much better toolbox. And your project should be doable with very few support circuits. But you must give your self time to learn your new tools. That most of all be a process of many small learning steps. Not so many big ones.
 

t06afre

Joined May 11, 2009
5,934
You can not debug the 16f690 chip without some extra hardware named debug header. By the way what examples are you referring to. Can you post some examples
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
699
yes is the header that is missing,
nothing mension when i buy this, all is included, also samples for testing but the sampels can not run without extra,...
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
699
PK2Error0024 PICKit2 was unable to establish a valid Vdd on the target Attemted 5.00v, read 0.00v , and i have external power, 5v, 100 % sure.
 

t06afre

Joined May 11, 2009
5,934
Try without the external power supply. It is nothing wrong in using an external power supply (5 Volt). But the board can also take power from the PICKIT 2 programmer.
 

t06afre

Joined May 11, 2009
5,934
Have you open the workspace file? Try to open "Hello World.mcw" file that should ensure you that all MPLAB settings are correct. If you use a non English version of windows. It might be that you have to give the correct path for the include file.
 

Thread Starter

FroceMaster

Joined Jan 28, 2012
699
Make: The target "C:\PK2 Lessons\LPC Demo Board\01 Hello World\Hello World.o" is out of date.
Executing: "C:\Program Files\Microchip\MPASM Suite\MPASMWIN.exe" /q /p16F690 "Hello World.asm" /l"Hello World.lst" /e"Hello World.err"
Error[105] C:\PK2 LESSONS\LPC DEMO BOARD\01 HELLO WORLD\HELLO WORLD.ASM 32 : Cannot open file (Include File "AC162061.inc" not found)
Message[302] C:\PK2 LESSONS\LPC DEMO BOARD\01 HELLO WORLD\HELLO WORLD.ASM 38 : Register in operand not in bank 0. Ensure that bank bits are correct.
Halting build on first failure as requested.
----------------------------------------------------------------------
Release build of project `C:\PK2 Lessons\LPC Demo Board\01 Hello World\Hello World.mcp' failed.
Language tool versions: MPASMWIN.exe v5.37, mplink.exe v4.37, mplib.exe v4.37
Thu Feb 09 21:02:15 2012
----------------------------------------------------------------------
BUILD FAILED
 

thatoneguy

Joined Feb 19, 2009
6,359
Is this a kit from Microchip, or a DIY PICKit 2 clone?

Which demo board do you have? (part number)
Are you running the PICKit 2 direct from the computer and not through 3 hubs?
 
Top