Android + PIC Microcontroler
Is it possible to communicate an Android application with a PIC microcontroller by the serial port? What phones of low cost can I use? Sorry by my 开发者_StackOverflow中文版englisg, I'm from Colombia.
Not sure about PIC, but Arduino might be a good reference point and has a Android coupler called Amarino. Good luck.
Yes it is possible to communicate an Android application with a PIC microcontroller via Bluetooth also. Check that post here every thing written so descriptive and i test the code, they are given, it simulate in proteus.
http://www.nbcafe.in/interfacing-android-with-pic-microcontroller-via-bluetooth/
Well, it is indirectly possible via Bluetooth, that is for sure. As Peter Chuang stated, there has been some work done for interfacing Arduino boards and Android phones in the past. The exact same methodology can certainly work with a PIC microcontroller.
All you need is:
- A PIC, preferably with an hardware UART to simplify coding (else software UART routines exist all over the net);
- A Bluetooth serial module. An example of one would be the RN-42/RN41 from RovingNetworks (which is the basis for many Bluetooth adapters you might find on Sparkfun and other hobbyist-catering electronics stores)
- An Android phone with Bluetooth.
I have actually tested such an interface myself, with a PIC18F26K22 linked to a RN-42 module, both being powered by a 3.3V linear regulator (MCP1700 3.3V). It is nearly plug and play, with baud rates easily achievable if in the low range (9600 baud and 19200 baud). As for higher baud rates, it is also possible if the PIC is clocked by a stable oscillator in the MHz range, and if the baud rate chosen corresponds to a USART BSEL register value that results in a close baud rate match between the 2 devices (which is possible because the RN-42 allows custom baud rates).
As for coding Bluetooth using Android SDK, it is a straightforward task using Google's own Bluetooth classes (BluetoothAdapter
, inter alia)...
Microchip now has a PIC 24F based board that uses the Android Open Accessory (I think that's what AOA stands for) protocol over the USB port. You can buy the board (called the Android Discovery Kit or ADK) from Microchip. I believe both the Android software and the PIC software are inside the current Microchip PIC software libraries down load package.
Of course if you want to go open-souce you can go out and get the IOIO board. I believe that board uses a slightly different PIC 24F processor. And it may be using the Android debugging protocol instead of the newer AOA protocol. I think it depends on what version of the IOIO board you get. Also, I think the IOIO board can play host to either the Android (like the ADK does) as well as some (not all) bluetooth USB dongles.
You will have to "roll your own code" based on the example Android ADK code from Microchip. However, with the IOIO board, you can download a library of methods that you can call. The library abstracts the PIC features to the point of simply typing IOIO... into the Eclipse editor and having it come back with a list of matching methods. Or so I understand.
Yeah it is possible. You need to use Bluetooth chip which talks over Bluetooth SPP. e.g. I used CSR-BC417 for more info Link to info of Bluetooth Chip
Micro-controller talks to Bluetooth chip using UART AT commands.
On other end you already have Android App like Bluetooth Chat where you can see the data coming from micro-controller and respond to it.
Download Android App
It is possible, i was using my Android smartPhone to send orders to a PIC microcontroller, you can use Bluetooth or WiFi hardware and the UART of the PIC, for example with de HC-06 bluetooth module or the Microchip's RN171XV WiFi module
about the app, i'm using this one: https://play.google.com/store/apps/details?id=com.vagoscorp.virtualterminal it's free and have a lot of working modes
for example instead of sending 123 as a character string '1' '2' '3', you can send it as a byte (byte value can be 0 up to 255), letting you to save and use directly the data as a number in the microcontroller ;). You can see the received information as characters and/or bytes too (character 'A' have a byte value of 65, that's ASCII code, '1' will be 49)
I hope it will help you
Yes you can connect it. The best or easy way to connect is use HC-05 Bluetooth module. It is cheep and a loot of tutorials available make a google serch HC-05 interface pic.
Another way if you want connect through usb to serial converter you need to develop usb to serial driver or you can use a usb to serial converter chip that supports linux Driver and make a android application with these driver. If you are not a expert, I suggest to use hc-05 Bluetooth. It is a better option.
精彩评论