The Godfather talking
You think I am funny guy huh?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 08:06:55 20:06


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 5687 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, 08:05:45 08: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
Senior Member
****
Offline Offline

Posts: 372

Thank You
-Given: 154
-Receive: 107


If the van is a Rockin'...


WWW
« Reply #1 on: January 29, 2010, 09:36:52 09: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: 172

Thank You
-Given: 98
-Receive: 101


« Reply #2 on: January 29, 2010, 11:15:12 11: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
*****
 Warned
Offline Offline

Posts: 555

Thank You
-Given: 156
-Receive: 355


« Reply #3 on: January 30, 2010, 06:24:12 06: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: 171

Thank You
-Given: 142
-Receive: 84


« Reply #4 on: January 30, 2010, 12:09:58 12: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: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #5 on: January 30, 2010, 09:02:28 21: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
mrpicing
Junior Member
**
Offline Offline

Posts: 56

Thank You
-Given: 133
-Receive: 33


« Reply #6 on: February 01, 2010, 03:25:34 03: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