DiyLightAnimation
Hardware => Other Projects => Topic started by: soakes94 on December 26, 2010, 12:51:08 pm
-
Im new to pics and things, and still need to get a pickit but I was wondering if there is any tutorials for people like me, as far as I know all I need is a pickit and somewhere to mount my PIC. How do I go around programming it, I don't think it will be to hard to program the PIC with the hex files that have already been written but I was thinking more about making something that will have a standalone mode unless the PIC is receiving code from the computer.
So lets say mood lighting in my bedroom that is controlled by a PIC but when I want to show off using my itouch and OSD touch or make my room a specific colour or something it will stop the stand alone mode and carry out the command issued by the computer.
Is this possible or am I asking for to much? And if it is possible how would I do it?
Thanks Steve
-
Pics are programed normally with C or assembly languages
For Microchip pics you will need to use mplab and you can get samples from microchip website along with forums.
There is also arduino pics but I am not familiar with that one.
Of course you can google for pic programming
Cheers
Rick R.
-
Just google there is a millions site about doing this kind of thing.
RJ
-
Okay thanks :), I think it will be easy to find ways to make the standalone mode, the only problem I would have would be adding to the 2 bits of code, so that when the PIC isn't receiving commands from the computer it defaults to standalone mode. Can you guys give me any help there?
Thanks :)
-
I'd have a timer running. Reset it to 0 when you receive a command. If it ever hits some timeout value, you now know that you haven't received anything within the timeout period, so switch to the standalone mode. If you receive a command while you are in standalone mode, switch to controlled mode.
/mike
-
I'm completely new to programming pics, any idea how I would work my way around that?
Thanks
-
I'm completely new to programming pics, any idea how I would work my way around that?
Thanks
Google pic programming and learn the basics of how the pic works and try tutorials. I just started to learn pic programming and then got side tracked. RJ does not release his firmware. So unless someone gives you code you will have to learn it yourself.
Rick R.
-
Here this will get you started :
http://www.google.com/search?q=pic+tutorial&sourceid=ie7&rls=com.microsoft:en-us:IE-SearchBox&ie=&oe=
RJ
-
Wow I need to get use to this stuff, I spent a year learning about all the equipment on DIYC mainly the renard stuff, am I correct in thinking that I don't need to program any of the pics with a pickit as lynx adress utility deals with this?
I'm not sure what I will do then to sort out code for my standalone mode + DMX. I might use a Renard board since I have access to that code and have the ability to change it.
Thanks
-
You would be incorrect in thinkng that you don't need a pic programmer for either the Renard or Lynx. The Lynx address utility simply sets the start address. It dose not load the firmware and the pic will do nothing without the firmware loaded. The same goes for the Renard designs. Renard does give a significant advantage for what you want to do by providing the code for the firmware but making the changes that you want to do may not be as easy as you think. You really need to fully understand how the board works and what the firmware is doing in order to make the changes required to implement your ideas and this is not simple stuff with all of the timing issues involved. You also need to make sure that the code you will need to add will fit into the memory of the pic that you are working with.
I also have this same idea in mind and wish that RJ would release some of his older firmware code for those of us wanting to learn to study from but that's completely up to him. It really doesn't make much sense spending months reinventing the wheel but if I have to, I can download and study the Renard code to get an understanding of how things work.