If you need assistance, please send an email to forum at 4hv dot org. To ensure your email is not marked as spam, please include the phrase "4hv help" in the subject line. You can also find assistance via IRC, at irc.shadowworld.net, room #hvcomm.
Support 4hv.org!
Donate:
4hv.org is hosted on a dedicated server. Unfortunately, this server costs and we rely on the help of site members to keep 4hv.org running. Please consider donating. We will place your name on the thanks list and you'll be helping to keep 4hv.org alive and free for everyone. Members whose names appear in red bold have donated recently. Green bold denotes those who have recently donated to keep the server carbon neutral.
Special Thanks To:
Aaron Holmes
Aaron Wheeler
Adam Horden
Alan Scrimgeour
Andre
Andrew Haynes
Anonymous000
asabase
Austin Weil
barney
Barry
Bert Hickman
Bill Kukowski
Blitzorn
Brandon Paradelas
Bruce Bowling
BubeeMike
Byong Park
Cesiumsponge
Chris F.
Chris Hooper
Corey Worthington
Derek Woodroffe
Dalus
Dan Strother
Daniel Davis
Daniel Uhrenholt
datasheetarchive
Dave Billington
Dave Marshall
David F.
Dennis Rogers
drelectrix
Dr. John Gudenas
Dr. Spark
E.TexasTesla
eastvoltresearch
Eirik Taylor
Erik Dyakov
Erlend^SE
Finn Hammer
Firebug24k
GalliumMan
Gary Peterson
George Slade
GhostNull
Gordon Mcknight
Graham Armitage
Grant
GreySoul
Henry H
IamSmooth
In memory of Leo Powning
Jacob Cash
James Howells
James Pawson
Jeff Greenfield
Jeff Thomas
Jesse Frost
Jim Mitchell
jlr134
Joe Mastroianni
John Forcina
John Oberg
John Willcutt
Jon Newcomb
klugesmith
Leslie Wright
Lutz Hoffman
Mads Barnkob
Martin King
Mats Karlsson
Matt Gibson
Matthew Guidry
mbd
Michael D'Angelo
Mikkel
mileswaldron
mister_rf
Neil Foster
Nick de Smith
Nick Soroka
nicklenorp
Nik
Norman Stanley
Patrick Coleman
Paul Brodie
Paul Jordan
Paul Montgomery
Ped
Peter Krogen
Peter Terren
PhilGood
Richard Feldman
Robert Bush
Royce Bailey
Scott Fusare
Scott Newman
smiffy
Stella
Steven Busic
Steve Conner
Steve Jones
Steve Ward
Sulaiman
Thomas Coyle
Thomas A. Wallace
Thomas W
Timo
Torch
Ulf Jonsson
vasil
Vaxian
vladi mazzilli
wastehl
Weston
William Kim
William N.
William Stehl
Wesley Venis
The aforementioned have contributed financially to the continuing triumph of 4hv.org. They are deserving of my most heartfelt thanks.
Registered Member #1107
Joined: Thu Nov 08 2007, 10:09PM
Location:
Posts: 792
this is my first pic project so i built a simple program that blinks a bunch of led's connected with bc550 transistors. RA0-RA3 are connected to led's that each go to one letter of my cousin Joey but in led's(see picture)and RB0-RB5 are connected directly to 6 low power ultrabright blue led's(one on each port)that i made flash around the border of my name. The oscillattor is a 10mhz resonater. when i got it all together and powered it up it worked like a charm for about 2-3 seconds and than stopped. i realised after a bunch of poking around that when i touch MCLR and RA4 with my finger it started to work again but after a couple of seconds it stopped. I am really puzzeled so if anyone has any tips plz let me know. Here is the program that works fine on my dev board when using 1 led for each letter and the led's on portB are steady and not flashing(same as in the real thing) the code is in basic
main: TRISA = 0 TRISB = 0 PORTA = %00000001 PORTB = %00111111 delay_ms(300) PORTA = %00000011 delay_ms(300) PORTA = %00000111 delay_ms(300) PORTA = %00001111 delay_ms(300) PORTA = %00000000 delay_ms(200) PORTA = %00001111 delay_ms(200) PORTA = %00000000 delay_ms(200) PORTA = %00001111 delay_ms(200) PORTA = %00000000 delay_ms(200) PORTA = %00001111 delay_ms(200) PORTA = %00000000 delay_ms(200) PORTA = %00001111 delay_ms(200) PORTA = %00000000 delay_ms(200) PORTA = %00001111 delay_ms(300) PORTA = %00001110 delay_ms(300) PORTA = %00001100 delay_ms(300) PORTA = %00001000 delay_ms(300) PORTA = %00000000 delay_ms(300) goto main end.
Registered Member #27
Joined: Fri Feb 03 2006, 02:20AM
Location: Hyperborea
Posts: 2058
You are correct, it should be pulled high. It is an active low input.
Usually connecting it directly to VDD in simple circuits like this is fine, but there are some cases where it will not be good enough. Using a resistor fixes most problems but in some cases a delay circuit must be made to make sure the PSU and oscillator is stable before the chip comes out of reset to make sure it does not lock up.
Registered Member #618
Joined: Sat Mar 31 2007, 04:15AM
Location: Us-Great Lakes
Posts: 628
If fidgeted with pics before and most have an internal reset system, as for the code...................If ur using basic ur Delay should be "pause X" where pause is the # of milliseconds u want it to pause for. If not just listen to bjorn, he's more informed then I am, also I haven't messed with pics in 2 years...
Registered Member #96
Joined: Thu Feb 09 2006, 05:37PM
Location: CI, Earth
Posts: 4061
Also MCLR is vulnerable to ESD, be very careful! i've had this problem and it can cause random lockups. the fix is to put a 15v zener across this pin if using the chip in an ICSP or other application.
Registered Member #95
Joined: Thu Feb 09 2006, 04:57PM
Location: Norway
Posts: 1308
WhiteArc wrote ...
If fidgeted with pics before and most have an internal reset system, as for the code...................If ur using basic ur Delay should be "pause X" where pause is the # of milliseconds u want it to pause for. If not just listen to bjorn, he's more informed then I am, also I haven't messed with pics in 2 years...
It looks like Mikrobasic to me, in which case his syntax is ok.
This site is powered by e107, which is released under the GNU GPL License. All work on this site, except where otherwise noted, is licensed under a Creative Commons Attribution-ShareAlike 2.5 License. By submitting any information to this site, you agree that anything submitted will be so licensed. Please read our Disclaimer and Policies page for information on your rights and responsibilities regarding this site.