Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
October 19, 2019, 04:53:47 04:53


Login with username, password and session length


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

Posts: 8

Thank You
-Given: 1
-Receive: 1


« on: July 17, 2019, 02:40:40 02: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: 4198

Thank You
-Given: 714
-Receive: 2761


There is no evidence that I muted SoNsIvRi


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

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

Note: Season & New Year Give Away. 3 year Holiday for Zero Posting
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 668

Thank You
-Given: 154
-Receive: 1162



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

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

Posts: 228

Thank You
-Given: 407
-Receive: 89

What is this for?


« Reply #3 on: July 17, 2019, 07:30:08 07: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: 17

Thank You
-Given: 27
-Receive: 8


« Reply #4 on: July 18, 2019, 06:14:41 06: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
Active Member
***
Offline Offline

Posts: 228

Thank You
-Given: 407
-Receive: 89

What is this for?


« Reply #5 on: July 18, 2019, 06:53:01 06: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: 17

Thank You
-Given: 27
-Receive: 8


« Reply #6 on: July 18, 2019, 09:52:31 09: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
Senior Member
****
Offline Offline

Posts: 430

Thank You
-Given: 1211
-Receive: 1420



« Reply #7 on: July 18, 2019, 12:34:37 12: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 IC 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, 12:40:35 12:40 by sadman » Logged
gurksallad
Newbie
*
Offline Offline

Posts: 8

Thank You
-Given: 1
-Receive: 1


« Reply #8 on: July 21, 2019, 01:30:15 01: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
Senior Member
****
Offline Offline

Posts: 430

Thank You
-Given: 1211
-Receive: 1420



« Reply #9 on: July 27, 2019, 08:36:05 08: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: 22
-Receive: 78


« Reply #10 on: August 04, 2019, 07:04:35 19:04 »

PIC18F4550
Logged
techneo
Junior Member
**
Offline Offline

Posts: 39

Thank You
-Given: 84
-Receive: 39


« Reply #11 on: August 07, 2019, 11:17:06 11: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: 8

Thank You
-Given: 1
-Receive: 1


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

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

Posts: 228

Thank You
-Given: 407
-Receive: 89

What is this for?


« Reply #13 on: October 10, 2019, 02:10:56 14: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: 28

Thank You
-Given: 141
-Receive: 23


« Reply #14 on: October 10, 2019, 05:45:50 17:45 »

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

Posts: 228

Thank You
-Given: 407
-Receive: 89

What is this for?


« Reply #15 on: October 10, 2019, 05:51:19 17: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
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