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.

Accuracy of PIC chips

Status
Not open for further replies.
YES this works main:
label_10: high 0
for b0 = 1 to 5
wait 1
next b0
low 0
wait 10
goto label_10

Now if i want to do another loop do i just use b1? e.g the number after the b is just another loop. Such as loop a, or loop b

hi,
You can use a1, b1, c1 etc as a variable names.

Just add loops with the For ... to Next statement to give further delays.

EDIT: when you choose a variable name example x1, you must use the same name at the start and the end of the loop.

eg:
for a1 =.............
...............
next a1

You cannot use:
for c1 = .....
.........
next d1

Do you follow.?
 
Last edited:
right well thanks for everyones help, especially eric gibbs. I actually get it now, and have moved on to making melodies just for fun. Anyway heres my final clock

main:
label_6: high 7
high 1
for b0 = 1 to 2
wait 60
next b0
low 7
for b1 = 1 to 779
wait 60
next b1
high 1
for b2 = 1 to 660
wait 60
next b2
goto label_6

It will send a high pulse at night time (activated at 18.00 hours). I have just been mucking around with the pic chip, doing various short time scale versions of this an expirimenting with loops and now I cant upload this final one. Heres what its saying in the screenshot. Hopefully you could help, its the schools equipment. Hope I havent broke it. I am assuming I will have to reset, but I dont want to wipe the picaxe boot code things. Cheers
 

Attachments

  • screenshot pic.jpg
    screenshot pic.jpg
    61 KB · Views: 131
hi varkunus,

Well done, just keep studying and read the PICAXE examples.:)
 
thanks for helping a pic noob out in a quest to get a gcse and become a beginner!!! :p So that circuit using an 18A pic chip should be accurate to within a second a day?
 
thanks for helping a pic noob out in a quest to get a gcse and become a beginner!!! :p So that circuit using an 18A pic chip should be accurate to within a second a day?

hi,
Yes, providing the crystal for the PIC is of the correct frequency and of good quality and able to maintain its stability.

There are other factors to consider when designing real time clocks when using a PIC.

Are you in the UK.?
 
I've tested one of my RTC PIC circuits (using a 32.768KHz crystal) and it was accurate to about 12 seconds over a 1 month period.

hi,
You can use a trimming capacitor to tweak the xtal in order to improve the accuracy.

Keep the xtal away from extremes of temperature change.
 
i always thought it was TS = thread starter. But aslong as its not loosing like 20 minutes like a 555 monostable timer would. Thats fine
 
Status
Not open for further replies.

Latest threads

Back
Top