The Godfather talking
This is god damn my place! Capisci?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2016, 03:34:27 15:34


Login with username, password and session length


Pages: [1]
Print
Author Topic: How do I best use the PORTE of 40-pin PIC uC ??  (Read 2543 times)
0 Members and 1 Guest are viewing this topic.
kanishka13
Newbie
*
Offline Offline

Posts: 9

Thank You
-Given: 6
-Receive: 2


« on: January 29, 2010, 09:05:45 09:05 »

Hey folks,

Any suggestions on what kind of applications does a 4-bit PORT provide?.

The datasheet of PIC18f4520 says "For 40/44-pin devices, PORTE is a 4-bit wide port.Three pins (RE0/RD/AN5, RE1/WR/AN6 and RE2/CS/AN7) are individually configurable as inputs or outputs.These pins have Schmitt Trigger input buffers".

I understand what I can do with the analog input channels.... but was interested to know about the 4-bit port operation.. are their any LCD or memory ICs that I can interface to the 4bit port? Huh

Shukriya
Logged
oldvan
V.I.P
Senior Member
*****
Offline Offline

Posts: 375

Thank You
-Given: 152
-Receive: 106


If the van is a Rockin'...


WWW
« Reply #1 on: January 29, 2010, 10:36:52 10:36 »

Pushbutton switches, LEDs, input form a rotary encoder, select pin for an EEPROM, I/O for a DS18B20 temperature sensor....
Logged

Give a man a fish and you feed him for a day.
Teach a man to fish and he will sit around in a boat drinking beer all day.
kayvee
Active Member
***
Offline Offline

Posts: 145

Thank You
-Given: 81
-Receive: 90


« Reply #2 on: January 29, 2010, 12:15:12 12:15 »

I think it's just the terminology they use.

Port E is only a 4 bit port whereas, for example, Port A is an 8 bit port. i.e. only has 4 pins assigned to Port E.  You can use the pins as any of the named functions for that pin (RE0 input /output, or /RD, or AN5) or together as a 4 bit wide port, depending on how you drive/configure them, much the same as any other 8 bit port on the part, or make them as wide as you want.  Nothing else implied, really.
Logged
hate
Hero Member
*****
Offline Offline

Posts: 556

Thank You
-Given: 156
-Receive: 354


« Reply #3 on: January 30, 2010, 07:24:12 07:24 »

I used to use the 3-bit versions on pic16 chips for LCD command pins and data pins on some other port to not to lose an i/o pin when they are used on the same port.

Regards...
Logged

Regards...
frasenci
Translator
Active Member
***
Offline Offline

Posts: 162

Thank You
-Given: 119
-Receive: 84


« Reply #4 on: January 30, 2010, 01:09:58 13:09 »

I think it's just the terminology they use.

Agree with that.
In my experience I have always used every pin on a PIC as per its particular functionality described in the corresponding Datasheet.
In adressing each particular pin and depending on Programming langauage/compiler you end up using syntax as portaA.1, portE.2 etc but it is only a convention.

Perhaps the only advantage on using the "port" concept is when you simultaneously toggle pin states on a particular port using syntax as portE = %0100 ( again depending on programming platform used ) , acomplishing the modification of the state of 4 pins ( in this example ) in only 1 line of code.

The only "port" concept on a PIC coming from hardware design side I have encountered, is the SPP ( Streaming paralell port ) you find in for example 18F45550 ( uses the 8 bits of "portD" ) but then again , settings depend on those of other "pins" of other " ports"...

I would say you stay with the "unitary" approach and treat every pin as a its own, Datasheet on the other hand (always)  provided.

Greetings
FAA
 
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2018

Thank You
-Given: 514
-Receive: 477


Top Topic Starter


« Reply #5 on: January 30, 2010, 10:02:28 22:02 »

Best way is goverened by your PCB layout and peripherals on that PORT!

When it is easier to use PORTX.[0..7] for the sake of making the layout looks neat, single sided, less vias if double sided, then why do you really care unless you can not control it with your software? So for example when you use a readily available LCD library that restricts you to use a single port, or use either the 4 lower or upper pins, then you are restricted, otherwise look at the datasheet, the missing bits from that 4 bit port are indicated to be read/written as in the datasheet.
Logged

nothing to say..
mrpicing
Junior Member
**
 Muted
Offline Offline

Posts: 56

Thank You
-Given: 133
-Receive: 33


« Reply #6 on: February 01, 2010, 04:25:34 04:25 »

I agree with "frasenci". he best explained the port. besides this these low count pin are very usefull to interface with RTCC or any other spi/serial/i2c devices.
I ever use rtc or leds on my board with PORTE.
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