Hello again good people.
Man, pic's are overwhelming
Information is scattered all over the internet, bits and peices everywhere. The problem is to get a grasp of it all, when you don't know the terminology. As a newcommer to pic programming, it seems impossible to get a complete picture on what does what.
I'll try to ask questions in a way that will help me find solutions on my own. I still need some pointers to show me if I'm heading in the right direction, or if I have completely missunderstood it all(most likely
)
So, on with the questions.
1: Input/Output ports.
TRISA.0 = 1 <-- would this make PORTA.0 input? and the logically;
TRISA.6 = 1 would be input?(and so on)
2: adcon1 digital
Here's a bit I have some problems understanding. In the datasheet for 18f1320, i find a table(10:2). It shows 7 configurable bits(?) and a -(which i'm guessing means that it's not used).
Does this translate to the following?;
ADCON1 = 0000001 ; all analoge, except PORTA.0 ? (note that it's only 7 "bits". Or should it be;
ADCON1 = 00000001; 8(bits) PORTA.0 digital?
I'm trying to make sence out of the datasheet, so if(again, most likely) i have missunderstood it all, i'd very much appreciate if someone would take the time to explain this relationship datasheet-->program to me.
And last;
If someone could show a very simple program that let's me use the pickit2 logic analyzer to show the status of a led(just one led, as simple as possible) i'd be very greatful. I have tried, and failed, over and over(and crasched pickit2 software so bad that it lost it's operating system...lol)
Thanks in advance
Bergaliv
<edit>Program examples in swordfish basic please
)</edit>
Man, pic's are overwhelming
I'll try to ask questions in a way that will help me find solutions on my own. I still need some pointers to show me if I'm heading in the right direction, or if I have completely missunderstood it all(most likely
So, on with the questions.
1: Input/Output ports.
TRISA.0 = 1 <-- would this make PORTA.0 input? and the logically;
TRISA.6 = 1 would be input?(and so on)
2: adcon1 digital
Here's a bit I have some problems understanding. In the datasheet for 18f1320, i find a table(10:2). It shows 7 configurable bits(?) and a -(which i'm guessing means that it's not used).
Does this translate to the following?;
ADCON1 = 0000001 ; all analoge, except PORTA.0 ? (note that it's only 7 "bits". Or should it be;
ADCON1 = 00000001; 8(bits) PORTA.0 digital?
I'm trying to make sence out of the datasheet, so if(again, most likely) i have missunderstood it all, i'd very much appreciate if someone would take the time to explain this relationship datasheet-->program to me.
And last;
If someone could show a very simple program that let's me use the pickit2 logic analyzer to show the status of a led(just one led, as simple as possible) i'd be very greatful. I have tried, and failed, over and over(and crasched pickit2 software so bad that it lost it's operating system...lol)
Thanks in advance
Bergaliv
<edit>Program examples in swordfish basic please
Last edited: