configuring Ports
-
- Member++
- Posts: 26
- Joined: Thu Nov 04, 2010 1:18 pm
configuring Ports
If it's possible to configure the ports for any kind of comunication protocol, i mean i can use either port A or port B, for example, to make my own I2C bus or generate "n" PWM channels?... I think that it's possible to do that, but Im not pretty sure.
-
- Experienced Member
- Posts: 126
- Joined: Fri Feb 12, 2010 10:31 pm
In general, yes you can define most protocols on any appropriate port. There are a few exceptions (e.g. USB or hardware-only SPI flash), but even then you're not locked in the way you are on a lot of MCUs. From a hardware pin point of view, not all pins can be accessed as a 1-bit port though, for example. Each chip or development board has a hardware manual that tells you how the different ports map to the pins.daleonpz wrote:If it's possible to configure the ports for any kind of comunication protocol, i mean i can use either port A or port B, for example, to make my own I2C bus or generate "n" PWM channels?... I think that it's possible to do that, but Im not pretty sure.
Cheers,
Brendan
-
- Member++
- Posts: 26
- Joined: Thu Nov 04, 2010 1:18 pm
thank you Brendan, it helped me a lot in what Im doing now (comunication between ADC and XS1 using I2C). In that I bet I can use two 1bit-ports, probably they will be XS1_port_1A and XS1_port_1B. :twisted:bsmithyman wrote:In general, yes you can define most protocols on any appropriate port. There are a few exceptions (e.g. USB or hardware-only SPI flash), but even then you're not locked in the way you are on a lot of MCUs. From a hardware pin point of view, not all pins can be accessed as a 1-bit port though, for example. Each chip or development board has a hardware manual that tells you how the different ports map to the pins.daleonpz wrote:If it's possible to configure the ports for any kind of comunication protocol, i mean i can use either port A or port B, for example, to make my own I2C bus or generate "n" PWM channels?... I think that it's possible to do that, but Im not pretty sure.
Cheers,
Brendan