Search found 392 matches

by siliconchip
Thu Feb 04, 2021 8:04 pm
Forum: 8-Bit PIC
Topic: ADC ISSUES
Replies: 4
Views: 21576

ADC ISSUES

Hi all ive been playing with ADC and ive used a potential divider (2 10k resistors in series) connected to AN0 of my chip Pic 16f1825, potential divider is connected to the circuits 5v supply, as i expected the display shows 2.5v, but if i alter the circuits 5v supply the lcd stays steady at 2.50v, ...
by siliconchip
Fri Dec 18, 2020 9:04 pm
Forum: 8-Bit PIC
Topic: Hz flash using interupt
Replies: 6
Views: 5195

Re: Hz flash using interupt

Hi martin
Ive not a particular frequency in mind but it would be nice to select a desired frequency from 1 to 1500 or something like that but i guess if possible would get pretty involved also just out of interest could you alter the code as you suggested to say 5Hz

Bob
by siliconchip
Fri Dec 18, 2020 8:00 pm
Forum: 8-Bit PIC
Topic: Hz flash using interupt
Replies: 6
Views: 5195

Re: Hz flash using interupt

Hi martin As always thanks for the reply, i removed the "pop" macro call from the main loop and added the relevant osccon details for speed and tested in hardware and found i had roughly a 1 second flash, i then used the example in the link you provided for toggling and found this was flashing a lot...
by siliconchip
Thu Dec 17, 2020 2:40 pm
Forum: 8-Bit PIC
Topic: Hz flash using interupt
Replies: 6
Views: 5195

Re: Hz flash using interupt

hi benj
thanks for the reply in simulation the led seems to flicker quick certainly more than 1 times a second even with the macro removed from the loop ??,also in some form of code wouldn't the timer macro need calling to perform the function rather than leaving it out

bob
by siliconchip
Thu Dec 17, 2020 11:25 am
Forum: 8-Bit PIC
Topic: Hz flash using interupt
Replies: 6
Views: 5195

Hz flash using interupt

hi all im trying to get my head around using Interrupts and how they work, therefore ive done a short program to try to simulate a led flashing at 1Hz but im having problems, the Interrupt is 15.2 Hz does this mean as im toggling the output its flashing 7.5Hz on and 7.5Hz off im confused on what man...
by siliconchip
Wed Dec 02, 2020 4:58 pm
Forum: General Programming
Topic: TIMER QUESTION
Replies: 5
Views: 5016

Re: TIMER QUESTION

Hi benj
Thats great many thanks

Bob
by siliconchip
Wed Dec 02, 2020 2:55 pm
Forum: General Programming
Topic: TIMER QUESTION
Replies: 5
Views: 5016

Re: TIMER QUESTION

hi benj and martin As always thanks for the replys im not too familiar with interupts are there any tutorials on them and how to use them a bit more in depth ?? Ive added my code and would appreciate it if you could give any pointers if ive over complicated it, its pretty much doing what i want now ...
by siliconchip
Tue Dec 01, 2020 7:52 pm
Forum: General Programming
Topic: TIMER QUESTION
Replies: 5
Views: 5016

TIMER QUESTION

hi all, id like to ask a question regards timers is it possible to use timer 2 under 2 different macro names ie timer 2 and timer 2a and adding 2 interupts with said names so i can toggle the same output A0 but for a different amount of time ie timer2 for 20 seconds and timer2a for 60 seconds, i had...
by siliconchip
Sun Nov 29, 2020 12:20 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi all quick up date with the issues ive been having while trying to simulate my code within proteus, i was using the pic16f877 but proteus software kept flagging stack underflow etc and failed to simulate after a few seconds of running, the ultimate solution would of been too build the circuit in h...
by siliconchip
Thu Nov 19, 2020 3:14 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi benj i clicked on the properties and sim already there as a No ???,i clicked on yes then back to no and recompiled but no change therefore i guess hardware testing is the only option now in case proteus is over reacting ? just out of curiosity ive added what proteus is displaying when it fails if...
by siliconchip
Wed Nov 18, 2020 5:54 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi benj
how would i set sim property to no ???

bob
by siliconchip
Wed Nov 18, 2020 4:42 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi benj
Thanks for the reply my program is the one a couple of posts ago 60Hz freq v2 i would appreciate any input from you cheers

Bob
by siliconchip
Tue Nov 17, 2020 10:06 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi martin thanks for your help again, with regards stack would using a different chip help ?? i agree i need to use hardware to test i thought using proteus would be quicker and easier for now, if any matrix staff are looking it would be great for any explanation. As always martin thanks for your he...
by siliconchip
Tue Nov 17, 2020 8:10 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi martin i copied the reworked timer as per your first comment but it didnt work ?? if i went wrong not sure where it was V2 is working in flowcode but when i simulate in proteus it gets as far as 3 seconds then error message flags "[PIC16 CORE] PC=0x04C0. Stack overflow executing CALL instruction....
by siliconchip
Tue Nov 17, 2020 7:02 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi martin thanks as always for the input, i rearranged as per your pic but no change on display, i then moved freq=timertick/2 from the calc box you showed because this was with TimerTick =0 to the calc box above the decision but i got similar results before, the hertz counts to 60 but after 120 cou...
by siliconchip
Tue Nov 17, 2020 1:11 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

hi all ive started to adapt the above flowcode and im trying to display the actual toggle output of the port and dividing the value by 2, which should be 61Hz but the output changes every second i can briefly show the output but its constantly resetting any ideas how i could capture or sample this, ...
by siliconchip
Wed Nov 11, 2020 9:47 pm
Forum: General Programming
Topic: HIGH LOW VOLTAGE DETECTION
Replies: 2
Views: 3537

Re: HIGH LOW VOLTAGE DETECTION

Thanks martin
by siliconchip
Wed Nov 11, 2020 7:48 pm
Forum: General Programming
Topic: HIGH LOW VOLTAGE DETECTION
Replies: 2
Views: 3537

HIGH LOW VOLTAGE DETECTION

hi all
is there away to find what 8 bit 16 or 18f pic micros that support the HLVD function other than picking a random chip and checking the data sheet if indeed they support it at all

cheers bob
by siliconchip
Sat Oct 24, 2020 4:17 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi martin thats great as i said i need to test in hardware and ive started to adapt it further but thank you for putting the time in its appreciated and hopefully now the use of interupts rather than delays will be a new avenue for me in future, your a top bloke and Matrix take note lol

Regards bob
by siliconchip
Sat Oct 24, 2020 1:40 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi martin
That makes sense with my interupt calcs the ouput should be 60Hz in hardware, ?? Should this 60Hz sway in the real world ie drop down to 58 this wouldnt show on the display would it or is it such that timing remains stable i would be using INTOSC at 16 MHz

Bob
by siliconchip
Sat Oct 24, 2020 12:50 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi martin this would explain the issues i had trying to simulate once i did i noticed that when button was pressed instead of running for 20 seconds it ran for about 0.5 of a second, where as this runs alot longer, should this then in hardware run for approx 20 secs ? I realise hardware testing is t...
by siliconchip
Fri Oct 23, 2020 10:38 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Martin thanks I can't check it at the moment but I'm sure as always it's awesome I will provide feedback tomorrow now where's that bloody thanks button 😀😀, once again top bloke thank you

Bob
by siliconchip
Fri Oct 23, 2020 10:18 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi Martin yep spot on when it runs for 20 secs show it's output on the lcd I did try but didn't understand how to convert the toggle

Bob
by siliconchip
Fri Oct 23, 2020 9:35 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi Martin is it possible to show the frequency on an lcd ..?

Bob
by siliconchip
Fri Oct 23, 2020 9:08 pm
Forum: 8-Bit PIC
Topic: Fixed frequency timed output
Replies: 33
Views: 13498

Re: Fixed frequency timed output

Hi Martin thanks as always, I've been messing around also to try and display the output frequency but I'm running into walls everywhere is it even possible ??

Bob