12F683 The nearest one to the 12F675 (probably doesn't work like that does it?).
12F683 The nearest one to the 12F675 (probably doesn't work like that does it?).
This compiles for the 12F683. May not be the correct pins to do the expected, I did not check that.
ANSEL is for turning the ADC on or off. Not clear why it gave an error.Code:ANSEL = %00000000 CMCON0 = %00000111 START: 'D0 HIGH GPIO = %11001111 GPIO = %00010000 PAUSE 500 'D1 HIGH GPIO = %11001111 GPIO = %00100000 PAUSE 500 'D2 HIGH GPIO = %11101011 GPIO = %00010000 PAUSE 500 GOTO START
The CMCON should have though.
"Overwriting previous address contents" is because I had the fuses set in code and the fuses commented out in the *.inc.
http://www.picbasic.co.uk/forum/showthread.php?t=543
Now for some data sheet reading![]()
Dave
Always wear safety glasses while programming.
Is there a set of code instructions for THE PBP demo version?
I'm trying to get an understanding of GPIO and the register TRISIO. If you set a TRISIO bit low you make the corresponding GPIO pin an output (I think) Except GP3 which is always an INPUT.
I've got a very blurred picture of how this all fits together, one day the fog will lift.... I hope.
Dave
http://www.melabs.com/resources/index.htm#Manuals
http://melabs.com/products/pbpis.htm
Now I see a mess up in my last codeI'm trying to get an understanding of GPIO and the register TRISIO. If you set a TRISIO bit low you make the corresponding GPIO pin an output (I think) Except GP3 which is always an INPUT.
should beCode:GPIO = %11001111 GPIO = %00010000
I think.....Code:TRISIO = %11001111 GPIO = %00010000
Sorry about that.
Dave
Always wear safety glasses while programming.
Hi mackrackit
Yes I ran that code and it compiled with no errors.
I loaded the HEX code (confirmed write successful) but the LED's didn't light?
I reloaded you earlier HEX file and all three LED's jogging along nicely.
Yup, different code for different PICs.
When do your 12F683s arrive?
Dave
Always wear safety glasses while programming.
I changed the code from GPIO to TRISIO
RE-compiled, re-loaded the HEX code file and away she ran.....!
Time for me to pause here mackrackit. I need to break your program down and figure out exactly what's going on. That way I can move on.
I'll try and figure it out and if you'd be so kind you can tell me how I got on.
It's the only way for me to learn.
As ever thanks for your help.
Dave
I'll try and figure it out and if you'd be so kind you can tell me how I got on.
I like it when someone wants to learn.
I will be here....
Dave
Always wear safety glasses while programming.
The 12F683's arrived today! I didn't order them until late last night, talk about service, I love the internet....:-)
I changed the 12F675 PIC over to a 12F683 and it ran your program a treat.
I've got a lot to learn still, a huge amount but really enjoying it.
My first project (I'm getting ahead of myself here I know) but my first project will be to make a 12F683 OUTPUT binary coded decimal four bit words and drive a seven segment display. I figure with the 12F683 having six outputs this is a viable project.
Dave
"I like it when someone wants to learn.
I will be here...."
Thanks for that mackrackit I appreciate it. I hope I don't drive you insane during my learning curve.....!
I'm off to bed now to dream of TRISO's.......
Dave
Well....My first project (I'm getting ahead of myself here I know) but my first project will be to make a 12F683 OUTPUT binary coded decimal four bit words and drive a seven segment display. I figure with the 12F683 having six outputs this is a viable project.
I hate to tell you this but I think there is something wrong with your counting...
Or mine![]()
Dave
Always wear safety glasses while programming.
Hi LEDDave,
16F628A might be easier to drive 7 segment as no driver translator chip required ( because it has enough ports ). Your biggest challange will be due to 31 lines of code limitation, in the Demo program.
I do not know if assembly code is counted in that limitation.
If you have that problem I am sure Mackrackit and I would compile a few programs for you, enough so you believe this compiler is worth it's price.
If you do not believe in MAGIC, Consider how currency has value simply by printing it, and is then traded for real assets.
.
Gold is the money of kings, silver is the money of gentlemen, barter is the money of peasants - but debt is the money of slaves
.
There simply is no "Happy Spam" If you do it you will disappear from this forum.
Bookmarks