Picmicro microcontroller

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
Frank Gutierrez
Posts: 3
Joined: Tue Jan 01, 2002 1:01 am
Location: San Jose, Ca
Contact:

Picmicro microcontroller

Post by Frank Gutierrez » Wed Apr 23, 2003 10:41 pm

Hi,
I would like to know if anyone is using the PICmicro microcontroller development board V2 by Matrix multimedia. I would like to interface with someone using this developemnt board in that I am not a C programmer and could use some help now and then. :)
My e-mail is [email protected]

bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Picmicro microcontroller

Post by bodgy » Thu Apr 24, 2003 2:55 am

I can't resist this, if this wasn't a microcontroller would you still interface with someone, or would you just want to talk to them instead? ;) <p>OK now that I have totally offended you, I believe the V2 board is their incarnation of the TK3 board by EPE magazine.<p>Are you using their version of 'C' which in various forms is known as Optima C or as Pavel 'C' Pavel being the original writer.<p>I use 'C' to program the PICS, so I may be able to help you generally.<p>I do have the Matrix 'C' tutorial lurking somewhere, if that is of any help to you.<p>One thing you need to know, is that it will still be helpful to know assembler, as only the very very expensive compilers, are code efficient.<p>For example, the code I produced for the water meter was over 3K words. If I had coded completely in assembler it probably would have fitted into 2K words or less.<p>My email is listed so feel free to email me if you have some questions.<p>Colin<p>[ April 24, 2003: Message edited by: bodgy ]</p>
On a clear disk you can seek forever.

Frank Gutierrez
Posts: 3
Joined: Tue Jan 01, 2002 1:01 am
Location: San Jose, Ca
Contact:

Re: Picmicro microcontroller

Post by Frank Gutierrez » Thu Apr 24, 2003 8:57 am

HI! Colin<p> Thanks for responding, I am definitely not to good at this, But your are right about just wanting to communicate with someone about programming the Pic microcontollers, I got the C4Pic Course. As to what version of 'C' I dont know.<p> I'm currently working with four 7-segment LED displays 0 - 3 and they are all working fine. What I want to do now, is to work with them independently. I manage to get each LED turn on independently and change the display, But this only worked for a little wail.<p>Basicly what I did was to make changes to the following:<p>Setup hardware,
Setup patterns (0 - 9)
Enable portA for output. PortA = 0xe0
[0][1][2][3]
display (0,0); => (2,0); [2]
" (1,1); => (4,1); [4]
" (2,2); => (6,2); [6]
" (3,3); => (8,3); [8]<p>The odd thing is that it only worked for a short time, that is after trying it different numbers it stop compiling.<p> My goal is to a)work with each element of the 7-segments LED for a game I'm thinking of. b)To add a keypad to with the LEDs.<p> I hope this explanes my problem and I sorry that I get wordy some times.

Frank G. <p>
:)

bodgy
Posts: 1044
Joined: Tue Dec 04, 2001 1:01 am
Location: Australia
Contact:

Re: Picmicro microcontroller

Post by bodgy » Thu Apr 24, 2003 5:07 pm

Frank,<p>The C4PIC course uses a version of the Pavel 'C' compiler.<p>I have to be honest, and say that I found errors in some of their tutorials, I did email them and they acknowledged, don't know if they altered anything though.<p>I'm not too sure if I understand what you're trying to achieve. If you just want the displays to light up by for example, press button 1 and display one is active, press 2 etc, then all you need to do is whip out the multiplexing bit, or go back to the tutorial that just has one display counting to 0--9 and duplicate this 4 times (to begin with, once this works you can work out on making this bit of code more efficient).<p>Also going back to my point about assembler, go throught the assembler listing that C4 produces, change the param_1_00whatever labels and variable names to something you find a bit more readable, perhaps knock off the param_1??? parts. Then follow this code through, you may suddenly find where the code is failing, partly because the parser doesn't produce the assembly code that you thought it might from the 'C' statements.<p>I'll email you some 7 segment code that I have, but be warned, I don't think you'll be able to just transplant it into your version of 'C', but it may help.<p>Colin
On a clear disk you can seek forever.

Frank Gutierrez
Posts: 3
Joined: Tue Jan 01, 2002 1:01 am
Location: San Jose, Ca
Contact:

Re: Picmicro microcontroller

Post by Frank Gutierrez » Thu Apr 24, 2003 10:52 pm

Hi! Colin<p>
What I am trying to do is this:<p> I'v completed section 4.0 of c4pic which is on 7-segment LED displays. Now what I normally do when I complete something like this, Is to test my self as to what I learned. Section 4.0 covered a lot, But the buttom line is that four LED displays got enabled displaying digits 0,1,2,3 so I ask myself, What can I do now that the code has been written. I like to think that I could now play with the code (sort of) and see if I could make changes and still keep it going. Am I reading the code right, if so I should be able to make the first LED go from [0] to [5] or even [a]and so on. By changing the hex NO. on TRISA I can enable or disable the 7-segment units.
As I explaned above that I was able to do what I wanted, But after a few times the compiler failed.
Was it becaus I needed to chang something else such as a counter count? By that I mean one unit was being enabled not all four and therefore I should change the display count size to one enstead of four.<p>
Thanks
Frank G.
:)

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests