Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 29, 2024, 11:33:22 11:33


Login with username, password and session length


Pages: [1]
Print
Author Topic: Which PIC for USB-connection to Android?  (Read 5239 times)
0 Members and 1 Guest are viewing this topic.
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« on: July 17, 2019, 08:40:40 08:40 »

I've been in the PIC16-world for ages and know that arcitecture very well. However, for the next project I need to interconnect a hardware design with a phone running Android, using USB. None of the PIC16 has USB-capabilities so I have to step up a few levels.

PIC24 seems to have both host and device mode, but this MCU seems to be ridiculously complex to jump into.

PIC18 has got device-mode for USB, no host mode.

Will device-mode suffice if my goal is to control the hardware from the Android-phone? That is, the hardware will be the slave and the Android will be the master. Android will send simple commands like "light LED, start MOTOR", and so on.


Will PIC18 do here or do I need PIC24/PIC32?
Logged
pickit2
Moderator
Hero Member
*****
Offline Offline

Posts: 4639

Thank You
-Given: 823
-Receive: 4194


There is no evidence that I muted SoNsIvRi


« Reply #1 on: July 17, 2019, 08:45:28 08:45 »

there are samples for PIC18F4550 in Proteus. they work well in demo mode.
Logged

Note: I stoped Muteing bad members OK I now put thier account in sleep mode
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 747

Thank You
-Given: 169
-Receive: 1288



« Reply #2 on: July 17, 2019, 10:04:40 10:04 »

You can use 18F14K50, small package (20 pin) also supported by MCC if you wish to use XC8 compiler
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #3 on: July 17, 2019, 01:30:08 13:30 »

Also look at 18F25K50, it's compatible with 2550/4550 code but with a few nice tweaks eg second USART, both SPI and I2C simultaneously, crystalless USB and still 5v.
Logged

Win 7 Ult x64 SP1 on HP2570p
tumbleweed
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 57
-Receive: 41


« Reply #4 on: July 18, 2019, 12:14:41 12:14 »

Quote
None of the PIC16 has USB-capabilities so I have to step up a few levels
There's the PIC16F145x (16F1454, 16F1455, and 16F1459), but they're fairly limited. I'd second towlerg's recommendation for an 18F25K50.

Quote
Will device-mode suffice if my goal is to control the hardware from the Android-phone?
Yes, as long as your android device supports USB-OTG
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #5 on: July 18, 2019, 12:53:01 12:53 »

Somebody correct me if I'm wrong but even if the Android device doesn't have OTG (both device and host) it will at least be a host.
Logged

Win 7 Ult x64 SP1 on HP2570p
tumbleweed
Newbie
*
Offline Offline

Posts: 34

Thank You
-Given: 57
-Receive: 41


« Reply #6 on: July 18, 2019, 03:52:31 15:52 »

USB host mode was introduced quite a while ago in Android 3.1, so these days that's probably true (but you never know)
Logged
sadman
Hero Member
*****
Offline Offline

Posts: 680

Thank You
-Given: 1739
-Receive: 2589


Sow The Seeds of Love


« Reply #7 on: July 18, 2019, 06:34:37 18:34 »

I've been in the PIC16-world for ages and know that arcitecture very well. However, for the next project I need to interconnect a hardware design with a phone running Android, using USB. None of the PIC16 has USB-capabilities so I have to step up a few levels.

PIC24 seems to have both host and device mode, but this MCU seems to be ridiculously complex to jump into.

PIC18 has got device-mode for USB, no host mode.

Will device-mode suffice if my goal is to control the hardware from the Android-phone? That is, the hardware will be the slave and the Android will be the master. Android will send simple commands like "light LED, start MOTOR", and so on.


Will PIC18 do here or do I need PIC24/PIC32?


Did you ever heard about google ioio board based on PIC18K it is and open source hardware software plate form directly driven from your android device and provide excellent feature i have made it for my personal use here is detail what IOIO can perform.

IOIOLib Basics - overview of IOIOLib.
IOIOLib Core API - introduction to the IOIO interface.
IOIOLib Application Framework - an important set of utilities that simplify IOIO-based application authoring.
Building IOIO Applications With Gradle - the latest and greatest way for building IOIO applications using Gradle, Maven and Android Studio.
Digital I/O - get those 0's and 1's in and out.
Analog Input - measure voltage.
PWM Output - generate pulse width modulation signals.
Pulse Input - measure pulse width and frequency.
UART - communicate with serial devices.
SPI - control SPI devices as a host.
TWI - control I²C and SMBus devices as a host.
Capacitive Sensing - touch-sensing by measuring capacitance.
Motor Control Sequencer - precise and synchronized control of various kinds of motors and actuators.
Resources
Downloads - this page has links to download all the software and firmware you'll need for development.
Release Notes - change log of the various versions of the software and firmware.
Supported Devices - a list of all tested devices.
Supported Bluetooth Dongles - a list of all tested bluetooth dongles.
Tools
IOIO-OTG Bootloader and IOIODude - a guide on using the IOIODude application that lets you upgrade the firmware on your IOIO-OTG board.
The IOIO Manager Application - a guide on using the Android application that lets you upgrade the firmware on your IOIO v1 board.
IOIO Bridge - use IOIO with the Android emulator or with a target Android being debugged.

all required info can be downloaded from here

https://github.com/ytai/ioio/wiki


sadman
« Last Edit: July 18, 2019, 06:40:35 18:40 by sadman » Logged
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« Reply #8 on: July 21, 2019, 07:30:15 07:30 »

I've heard about IOIO, but alas it will not fit for this project. The PCB will reside inside a DB36-shell.

A IOIO might be good for debugging, though.
Logged
sadman
Hero Member
*****
Offline Offline

Posts: 680

Thank You
-Given: 1739
-Receive: 2589


Sow The Seeds of Love


« Reply #9 on: July 27, 2019, 02:36:05 14:36 »

I've heard about IOIO, but alas it will not fit for this project. The PCB will reside inside a DB36-shell.

A IOIO might be good for debugging, though.

There are some small footprint chip that can fit inside the DB36-SHELL IOIO code is open source and you recompile it for other chips which have USB support mainly it was develop for control hard attach with it via blue tooth or WiFi using android device.  
Logged
XxMohannadxX
Newbie
*
Offline Offline

Posts: 32

Thank You
-Given: 23
-Receive: 78


« Reply #10 on: August 05, 2019, 01:04:35 01:04 »

PIC18F4550
Logged
techneo
Junior Member
**
Offline Offline

Posts: 51

Thank You
-Given: 120
-Receive: 41


« Reply #11 on: August 07, 2019, 05:17:06 17:17 »

A 20-pin mcu pic18k13k50  could do fit in the space you require...

A board is already available at the following address

https://rusticengineering.wordpress.com/tag/pic18f13k50/




-techNeo
Logged
gurksallad
Newbie
*
Offline Offline

Posts: 27

Thank You
-Given: 12
-Receive: 6


« Reply #12 on: October 09, 2019, 10:17:05 10:17 »

18F4550 seems it might work. I will give it a try.
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #13 on: October 10, 2019, 08:10:56 20:10 »

I don't know how that happened (my thank you), finger trouble? decrepitude?

Unless you need lots of gpio, 18F2550 or even better 18F25K50 is just as capable but in a much smaller package.
Logged

Win 7 Ult x64 SP1 on HP2570p
MisterX
Newbie
*
Offline Offline

Posts: 29

Thank You
-Given: 158
-Receive: 24


« Reply #14 on: October 10, 2019, 11:45:50 23:45 »

I suggest you PIC16F1454 this is the smallest MCU (14 pins) with USB.
Logged
towlerg
Senior Member
****
Offline Offline

Posts: 263

Thank You
-Given: 474
-Receive: 104

What is this for?


« Reply #15 on: October 10, 2019, 11:51:19 23:51 »

Perhaps the lowest pin count but very short on Ram. If physical size is an issue, use a 25K50 and some other package than PDIP.
Logged

Win 7 Ult x64 SP1 on HP2570p
Martin Miranda
Newbie
*
Offline Offline

Posts: 10

Thank You
-Given: 8
-Receive: 0


« Reply #16 on: February 15, 2020, 11:38:50 11:38 »

i did not bothered with using the usb in pic mcu... i just resorted to using fdti's usb-uart instead.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC