Thanks, I also found that page and was about to try it.Here is a tutorial for using the communication libraries for the pic16f and mplabx. If there anything helpful in there:
http://extremeelectronics.co.in/pic16f877a-tutorials/usart-library-for-pic-setup-on-mplab-x-ide/
I changed to the other PIC -the loose 16F88 instead of the 16F887 on the demo board-, recalculated the SPBRG and changed the frequency to 8Mhz, built 2 circuits -one for programming and another for the serial communication- and the example is now working without problems.What transmission format are you using for the communication, if any, RS232/RS485 etc.
Max.
That's not the interface standard, RS232/RS485 etc apply to the communication levels, not the content.About the transmission format: I don't know that is called, it's: asynchronous, 8bits data, no parity, and 1 stop bit.
Then I don't know what you are referring to... what standards can I use, and how are they going to influence the PICKIt2 uart monitor?That's not the interface standard, RS232/RS485 etc apply to the communication levels, not the content.
Max.
I see what you mean.I wasn't sure if you were using any of the common communication standards.
When using serial transmission data, especially over long distance, the signal is 'conditioned' in an attempt to prevent spurious interference of the data, if you looked at the Nigel Goodwin tutorial you would see he used RS232 via a MAX232 IC.
They won't necessarily affect the way you are doing it as long as both ends can communicate.
Max.
Thanks Joe,A Arduino also has a boot loader stored in the Atmel controller. This is what all Arduino boards have in common. So to get a PIC to do the same, look for someone who has done the same. The only one that comes to mind is the Basic Stamp, but the Stamp actually compiles the Basic as it runs it on the chip, so that is rather lame when it comes to speed. The chip you want to checkout is the picaxe. So Google that.
As for your code being protected on a PIC, it is done when you burn the program, you set fusible links in an option register. Once you do, that chip is locked.
There are far more PIC controllers than there are Atmel controllers with or without boot loaders. If you go the PIC route, the code you write for a low level device, can easily be ported over to a more powerful device with more abilities. My gut notion about PIC is that you can do way more with it than you can do with any Atmel chip. The focus of Arduino is education, and not the sale of Atmel chips. The goal of Microchip is to sell chips, and it might surprise some to know that the sale of 8 bit PIC's has exploded in sales this year.
Arduino is much easier to get running for someone new to Micro-controller programming. Also, Arduino teaches C programming, and some people think C is difficult to learn. Arduino proves that to be wrong. In any case, PIC has a few good Basic compilers. If you intend to stay with programming micro-controllers, start with C. C compiles to smaller code, and has much more user based support on the Internet and in downloadable PDF books. Joe
TRISA = 0;
PORTAbits.RA0 = 1;
PORTAbits.RA1 = 1;
That's exactly the reason why LATs were introduced in newer chips.how many should be on after this piece of code? ... both, isn't it? ... Well, not on the PIC16F88; only the last one you turn on remains.
Anyone knows why?
Thanks a lot; I was already giving it for impossible and looking for ways to just write the whole word every time.That's exactly the reason why LATs were introduced in newer chips.
The operation is done through bsf instruction. It reads PORTA, changes one bit, then writes in back. Therefore, all other bits except the one you're setting, are changed to whatever was read from PORTA. And this could be:
0 if the pin is configured as analog. To fix: you need to reconfigure as digital
0 if it hasn't been ebough time since it's been set. To fix: insert some delay between setting bits.
or
get a PIC with LATs.
Not all pins have analog capabilities.But why this didn't happen with the other PIC; nor with any other example I saw, since I never saw one using ANSEL first?
I see. Yes, the other pic doesn't have the analog I/O on the same pins.Not all pins have analog capabilities.
That pin is not accessible for output.I see. Yes, the other pic doesn't have the analog I/O on the same pins.
What about the I/O pins that also share the MCLR? I can't get anything out from that pin, either with the CONFIG MCLR on or off. Furthermore, if I have an LED attached to that pin the programmer will not even find the device; it says: "PICkit 2 VPP voltage level error. Check target & retry operation."
I also tried adding an isolation resistor, and both with the MCLR pull-up resistor and capacitor, and without them.
| Thread starter | Similar threads | Forum | Replies | Date |
|---|---|---|---|---|
|
|
Doubts about the format of 4-layer PCB | General Electronics Chat | 3 | |
| H | Power over coax circuit doubts | General Electronics Chat | 0 | |
|
|
Doubts regarding a CS5530 ADC circuit | Analog & Mixed-Signal Design | 0 | |
| K | some doubts about 8051 mcu | Microcontrollers | 22 | |
|
|
Quick doubts on FinFET | General Electronics Chat | 7 |