PICs are very hardy but anything can fail.By the way....it is possible for PICs to fail....best to order more than 1 just in case!
be80be said:Oh by the way If it was me and I was just starting i would go with the 18f chips and by all means get two of each
2 > 18f1320 2 > 18f452 and 2 > 18f4550 There a lot of code for them to try out and see what going on
You will have no problem using 18F PICs as they are very close to the 16F family. They work better with compilers too.
If I had to program in basic it would be Swordfish basic. I prefer C.
You agree with Jon but then you sayI agree with Jon Chandler.
And I said you have to take the sweet with the saltThe problem I see it is a lack of micro controller based C tutorials that address the controller properly. A few years I made an attempt at doing so. The goal was to explain the hardware and every line of code needed to configure a PIC and turn on a LED.
#include <pic.h>
#define BUTTON RA0 //bit 0 of PORTA
main(void)
{
unsigned char i, j;
TRISB = 0; /* all bits output */
j = 0;
for(;;) {
PORTB = 0x00; /* turn all on */
for(i = 100 ; --i ;)
continue;
PORTB = ~j; /* output value of j */
for(i = 100 ; --i ;)
continue;
if(BUTTON == 0) /* if switch pressed, increment */
j++;
}
}
be80be said:Now make it work with out knowing how to read a data sheet and under stand some asm
That's right but it needs someThere is no ASM in the program!
OSCCON 0x72 /* sets osc to 8mhz */
ANSEL = 0x00 /* sets porta digital */
Regardless of the language everyone needs to read and understand uC data sheets. As Nigel has said, most of the examples in the datasheet are in asm. But the same information is exists outside the example. Even if they do not know PIC ASM reasonably intelligent people will be able to figure out what the asm examples are doing given the code comments and text in the datasheet. I do not see it as reasonable to learn PIC ASM just to read the few lines of examples in datasheets.
If you bothered to look at the tutorial you will see that it takes great pains to provide all the details needed to understand the C18 code used. It explains the "hard part" for new people, how to configure the chip using the compiler specific methodology.
Nigel said:It's not just a question of 'reading the datasheets', it's understanding the processor and what you're doing - PIC assembler is trivial to learn (FAR easier than learning C), and probably a single evening would be all you would need to gain enough assembler knowledge to greatly improve (and speed up) your C programming.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?