Quantcast
Channel: MSP430 Technical Forums
Viewing all articles
Browse latest Browse all 2077

msp430 peripherals to tm4C123G peripherials

$
0
0

I found an adaptation of a cap-sense sketch that uses port manipulation to create a capacitive sensor for Arduino to a MSP430. My question is that when I was using the sketch and adjusting it to use a tm4C123 device, I got these errors:

 

TouchSensor.ino: In function 'uint8_t readCapacitivePin(int)':
TouchSensor.ino:58:24: error: 'P1OUT' was not declared in this scope
TouchSensor.ino:59:23: error: 'P1DIR' was not declared in this scope
TouchSensor.ino:61:23: error: 'P1IN' was not declared in this scope
 
I looked into this and found out on this post:
 
That this is using peripheral names on the MSP430 regarding registers

P1DIR - to set direction
P1OUT - to set an output bit

P1IN - to read an input bit

I remembered that wiring.c defined the port, pin and ddr. And if I commented out

 
    port = (uint8_t*) &P1OUT;
    ddr = (uint8_t*) &P1DIR;
    bitmask = 1 << pinToMeasure;
    pin = (uint8_t*) &P1IN;

It would compile but I feel I am missing something

 

My problem is that I was looking into how to change the peripheral names for tm4c123 instead of the MSP430 so I can use the sketch on my tm4c123.

 

Here is the link to the sketch:

https://gist.github.com/thecodemaiden/6040927


View the full article on Stellarisiti. 43oh pulls Stellarisiti Energia posts, so that members do not miss out questions. Please bear with this arrangement for now. Thanks!

Viewing all articles
Browse latest Browse all 2077

Trending Articles