Hi guys. This is very strange, really. And since it is very strange i must have forgot to do something very simple....
Anyways this is my problem: i got a 28A picaxe, programmed to do a "high 5, low 4". That's all. I connect my picaxe chip on my 28 pin board (the one i also use for my picaxe 28x1) and everything works fine (LED lights up). I take it out, put it in my custom board, and it doesn't work. Now, my "custom board" is not more than a 28 pin IC-socket which has every pin connected to a male header and the download circuit, the battery is connected directly to the V+ pin and so is the ground(V0 pin just under it). This is quite strange.... don't ask me if i have checked the connections, i checked them ten times already!
forgot to mention that the download circuit i built only works with my other chip, the 28x1. To get the program on the 28A i had to plug it onto the board
just an idea: is the resonator needed? i discovered that 28A doesn’t have an internal one.
ok…i didn’t know the ok…i didn’t know the resonator would help in switching on and off (high/low) a pin, i only thought i would need it for, say, serial comunication and other time-based stuff. Could somebody explain why they are important even in these actions (switching on/off). It’s not for making the picaxe work, it’s just because i like to understand how these things work
Uh… in my most humble opinion, resonators are pretty much like a heartbeat… you can’t live without them. Something need to be ticking inside your processor, telling the circuits it’s time to go from one state to another: “hey buddy, it’s time to move to the next step in your program.” So, my understanding is, that’s the role of a clock in any computing device.
I’m not sure what exactly the resonator does though… the gut feeling is, it’s part of the clock circuit, isn’t it?
I’ve got feeling I’m either talking nonsense or something vey trivial… nevermind…
i knew it was some sort of clock, only thought he would need it in some precise commands
well thank you everyone for the informations!
oh maybe one last thing: crystals only have 2 pins, so in case i don’t find a 3-pin resonators, do you know if there’s anyway to get two of them and combine them?
I don’t really know how they are made, but i guess you just stick them to the two resonators pin, and the other pin on both goes to the ground.
Oh and yet another thing :), in case i use crystal will i also have to use capacitors (heard that the resonator soldered on the picaxe have them built-in)?
i don’t know too much about i don’t know too much about crystals, but if you can’t find a resonator, (try farnell) then 3 1/4in floppy drives had a 4MHz on inside of them, and seeing as nothing seems to come on disk anymore, you may be able to find one laying around from an old pc that nooone will miss. (they also have a stepper motor and some other bits and pieces inside too)
You’ll definately need a crystal or resonator, as others have said, due to the need for a basic clock or “heartbeat” for the chip. Every instruction fetch and execute cycle depends on the clock. In other words, the clock controls the timing of the execution of every instruction, and without it nothing happens. Using a crystal is a little more expensive than a resonator, but also gives a more accurate clock frequency.
As for crystals, if you fit one of those, the middle pin of the three (ground) is unused. But you will need to fit the two capacitors. Just connect the crystal’s two pins to the PIC’s pins 9 and 10, then connect two capacitors from ground, one to each crystal pin.
thank you oh and about the capacitors do you have any suggestion as to their capacitance? I really don’t know which calculations i need to do in order to understand that.
oh wait the crystals i have seen only have two pins not three as you said…
Check http://www.hvwtech.com/products_view.asp?ProductID=321. As for values, it depends on the crystal and you should check the spec sheet for the crystal. I have seen values from 10-22pF being used. Remember to mount the caps and crystal close to the chip.
Resonators Resonators can have 3 pins, and sometimes have internal caps as well so you don’t have add any. The data for the PIC should have recommendations on what device to use.
@ jka: thanks for the link! but i wasn’t afraid not to find it on the net, but at my local electronics store anyways it has a nice schematic with capacitors too, thank you
This is the sort of thing most people don’t bother to learn when using those prefabricated boards like the one used in “how to make your first robot”. They are great to start out on to get a handle on how to program, but you don’t really learn anything about how the circuit works.
My hat is off to you for creating your own board and gaining actual knowledge about the hardware. I know most of the people here are new and the “how to make your first robot” tutorial is a great place to start, but I hope that more of them will endeavor to branch out and start making their own circuits and learning how and why they work.
Isn’t that the point…that you’re starting out… You don’t just jump to trigonometry just because you’ve learned how to add and subtract…
There is a natural progression in this hobby that you will get to a point where you’ll need to know a certain amount of how the electronics work to be able to go further. At that point, the interenet is a great place…
i thought about building my own board because, as hootyhoo said, it’s fun and interesting to actually learn about the components you are using and understand why you are using them. Not only, by making it i have improved my soldering skills, which were kind of poor (much better now, but still in the process of learning). And of course you can customize it anyway you want, for example i have added a male header for every pin on the picaxe so that i can easily bypass all those connections they go through on the picaxe board, and can easily interface it with a breadboard, and have also added 7 pins for V+ and 7 for V0.
I really suggest everyone to make one! And by the way…i’ll be reading allaboutcircuits.com, i am really frustrated to see circuits work not knowing why (eg: why does a 4.7k resistor goes there? etc…)
Thank you everybody for the feedback!
today i went to some local electronics store. I bought a ceramic resonator and looks like the circuit is working as it should, how happy i am! Only one thing: i don’t know if it has built-in capacitors. Those guys at the electronics store didn’t even know what resonators were, i had to show them they actually had them in stock, so imagine if I asked them if those resonators had built-in caps -_- … they are standard 3-pin resonators like those on the picaxe board (by standard i mean…their design is standard). So what is gonna happen if they have no capacitors? To my guess, the resonator would heat up, but i have had the circuit running for some 2 minutes and it’s not heating up… guess it’s fine.
Not a lot The device will either not function, or may have the frequency off a bit. If it works, and you still have serial communicaitons with the device, you are probably ok. The caps just serve as a feedback, to give the a steadying "bounce". There mey be a few tech notes about them using the search terms Colpitts or crystal oscillator
That’s why I said that That’s why I said that they’re great to start out on. Using a prefab board eliminates most of the frustration of not being able to get it to work. After you’ve gotten it to work and learned how to program, the next progression is to start building your own circuits. I am seeing people having trouble interfacing PICAXEs with the more advanced stuff because they haven’t yet taken the time to figure out the basic circuits work.
does anybody know if that way of interfacing the resonator works with picaxe? (the one in the link) I see nothing wrong with it, but you know just to be sure…