No problems, we're all here to help.So no, time to build this circuit (I need to make something work) and I'm sure I'll still have plenty of questions for you about the basics still, so you're not of the hook quite yet....;-)
No problems, we're all here to help.So no, time to build this circuit (I need to make something work) and I'm sure I'll still have plenty of questions for you about the basics still, so you're not of the hook quite yet....;-)
Hi everyone.
I haven't posted for a wee while but have been busy reading and building my first two circuits.
The first is a 12F683 driving four LED's in a binary pattern 0-9 as per the thread (I've also added a nice little Night_Rider effect). I must say, although simple in what I've achieved, when those four LED's run up that binary pattern it was a real thrill, amazing.
The second circuit marrying the binary counting PIC to the BCD decoder driver then seven segment display is about half way built ( I'm quietly confident about this one fingers x'd).
Once again, thanks for all your help on here. I really wouldn't have got this far without it.
I'll be back when the second circuit is completed (early part of next week).
Hope you're all keeping well.
David
Hi Everyone.
Just to let you know I've got a a working circuit!!!!! Yippee.
It's a 12F683 into a SN74LS47N display driver and a 1" seven segment display counting up to nine.The PIC output also switches four transistors with collector LED's for a binary output count as well.
Simple stuff for you boys I'm sure but I'm chuffed to bits right now.
Not sure where to go or what to do next (any ideas welcome).
Thanks for your help as ever.
Dave
COOL!!!! You are moving right along.
Here is an idea. Setup a hardware timmer to change the display once per second.
Last edited by mackrackit; - 19th March 2010 at 23:12.
Dave
Always wear safety glasses while programming.
Hi mackrackitHere is an idea. Setup a hardware timmer to change the display once per second.
Are we saying for example to use the trimmer pot on the PICkit1 to alter the display speed ADC? (ADCIN).
I'm seriously considering buying the the full program version by the way (I'm just trying to convince myself I'm clever enough to figure out how to use / make the most of it...lol).
Really enjoying it though (headaches aside ;-))
Dave
Last edited by LEDave; - 20th March 2010 at 00:12.
No, not trimmer... or timmer .... I really need to get a dictionary
Timer as in TMRO.
Many times we will at the beginning of a new project to make sure things are setup correctly we will do a simple "blinky" just like we tell the newbees to do. I will a lot of times leave it running as a "heart beat" type of thing. But if you do this using pauses to blink the LED the pauses will maybe get in the way.
So now comes a basic interrupt based on time.
This may or may not be correct for your chip so verify with the data sheet.
Code:INTCON.5 = 1 'ENABLE TMR0 OPTION_REG = %10000101 '16BIT 1:64 PRESCALE ON INTERRUPT GOTO TLOOP MAINLOOP: 'MAIN CODE GOES HERE GOTO MAINLOOP DISABLE TLOOP: INTCON.2=0:TOGGLE PORTD.4 RESUME: ENABLE
Dave
Always wear safety glasses while programming.
Hi mackrackit, everyone.
I've been doing a lot of reading trying to figure out what's actually going within your Timer / Interrupt program. So here's my interpretation (he typed as he makes a fool of himself again).....!
Setting the Interrupt_Control pin.5 = 1 simply enables the Timer0 interrupt.Code:INTCON.5 = 1 'ENABLE TMR0
First of all you set the Global Interrupt Enable bit.7 =1.Code:OPTION_REG = %10000101 '16BIT 1:64 PRESCALE
Then bits 0 = 1 & bit 2 = 1 sets the PRESCALE value 1/64 of the system clock.
4MHZ or the instruction clock 1MHZ (not 100% sure on that one) This divided down figure is then sent to the TIMER0 register (incremented count from the prescaler).
When the count goes from FF(HEX) +1 (255 decimal,it over-runs back to zero).
So (wild assumption here) when the count overflows passed 255 the INTERRUPT occurs and the program jumps to the Label TLOOP. The LED blinks, then INTCON.2 pin is the reset to 0 and it does it all again.
So basically to my (small) mind the LED would blink every 1/64th of 1MHZ.
Anywhere warm on this one?
Dave
Last edited by LEDave; - 22nd March 2010 at 18:20.
Bookmarks