CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

OT:Pin selection on PIC16F1827

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

OT:Pin selection on PIC16F1827
PostPosted: Sat Feb 20, 2010 2:56 am     Reply with quote

I posted this on the microchip forum, but got no reply,
i know its not a CCS issue, but can any PIC guru's help me out here.


the 1827 has pin selection registers which allow for pin selection of the function.
------------------------------------------------------------------

I am very confused about why Microchip has chosen such a strange pin selection setup.

Since the PIC16F1827 has 1x uart, 2xMSSP, so its has a potential for 1x UART, and a choice of either 2x I2C, 2xSPI, or 1xI2C and 1xSPI

why oh why have they chosen pin2 RB2 to allow it to be used as Tx,Rx,SDA2,SDO1,SDI2., similar for RB1,RB4, and RB5

I cant see a way of getting a configuration other than

1xUART and 1xI2C or 1xSPI, so why have 2 MSSP's ?

I would have thought that the pin selection would allow flexibility of

1x UART,1xI2C,1xSPI

it seem crazy to me

Mike
Ttelmah
Guest







PostPosted: Sat Feb 20, 2010 10:35 am     Reply with quote

A Uart, is not seen as a particularly 'useful' peripheral for many standalone applications. With SPI being used to talk to memory, displays, etc., the UART is seen as something unlikely to be used. Hence much more useful to be able to get rid of this and have an I2C, or second SPI.

Best Wishes
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

PostPosted: Sat Feb 20, 2010 11:59 am     Reply with quote

Ttelmah,

I respect you as a long time poster.

But I don't understand your logic.

If the uart wasnt needed, and can't be used , why waste the silicon.

Once again, if the chip has 1xuart, and 2x MSSp, surely it should be able
to configure the pin selection register to use them.

This is rhetorical.

Mike
Ttelmah
Guest







PostPosted: Sat Feb 20, 2010 1:24 pm     Reply with quote

The silicon is a few dozen gates.
The restricted feature is pins.
This is why more powerful chips allow you full 'pin selection', with you selecting which peripheral goes to which pins. However full selection involves a lot more silicon.
On this chip, you are being offered a choice of one MSSP, and a UART, _or_ 2*MSSP's.

Best Wishes
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

PostPosted: Sun Feb 21, 2010 8:30 am     Reply with quote

Ttelmah,

I totally agree that the pin count is the restriction, which is why a need for pin selection exists at all.

If "The silicon is a few dozen gates.", then why not allow 3 or 4 other pins to be in the pin selection agenda.

My point of posting was just to confirm that the 3 function blocks could not be used, only 2 out of 3.

Which you have confirmed. If I was a Microchip FAE, I would be a bit mad !!

So, one hardware block must be thrown away, which is a shame.

Mike
MikeW



Joined: 15 Sep 2003
Posts: 184
Location: Warrington UK

View user's profile Send private message

extra info
PostPosted: Wed Feb 24, 2010 1:12 am     Reply with quote

got this reply from the microchip forum.

I need to check it out, but if true, its great news !!

----------------------------------------

Mike,

Read section 12.1 "Alternate Pin Function" in the 16F1827 data sheet. All 3 serial comms can be used at once.

Using APFCON0,

-- Reassign RX/DT to RB1
-- Reassign SDO1 to RA6

This frees RB2 to be used as SDA2.

Maybe Microchip isn't so crazy after all. Smile

Best Regards,
Ron
temtronic



Joined: 01 Jul 2010
Posts: 9245
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sat Dec 27, 2014 6:49 am     Reply with quote

in carrying on 'silly pin usage' WHY the doubling up of VDD and VSS on PICs like the 18F46K22? Never had a problem using just one pair of power pins and who wouldn't like TWO more I/O pins to play with!

You'd also think uC would have had a better layout for the ICSP pins.

sigh too much stuff inside this blobs of epoxy these days !

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group