aanon4 / BlueBasic

BASIC interpreter for CC2540 and CC2541 Bluetooth LE chips
https://gitlab.com/timwilkinson/BlueBasic
97 stars 55 forks source link

Pins and names CC2540 #5

Closed gregwinn closed 9 years ago

gregwinn commented 9 years ago

Based on your wiki page: "https://github.com/aanon4/BlueBasic/wiki/Pin-names-and-uses"

You are showing

P0_2 -> RX
P0_3 -> TX

Based on TI's information i show them as:

P0_2 -> MISO
P0_3 -> MOSI

Am i getting something wrong?

aanon4 commented 9 years ago

Both are correct. Hopefully the code handles both uses cases, depending on whether you enable SPI 0 or SERIAL first. I've not yet tested both together (need some new boards which will arrive this weekend) so let me know if there are problems.

gregwinn commented 9 years ago

Got it... I had enabled SPI 0 but reset the board to try SERIAL... Do you have an example of enabling SERIAL?

gregwinn commented 9 years ago

Sorry I see the wiki page: https://github.com/aanon4/BlueBasic/wiki/Serial

gregwinn commented 9 years ago

To be clear here The only item that is required is ? I just want a pass through. BLE -> My Serial Terminal

// Example
SERIAL 9600
aanon4 commented 9 years ago

The minimum would be:

// 9600 baud, no parity, 8 data bits, 1 stop bit, no hardware flow control SERIAL 9600,N,8,1,N

gregwinn commented 9 years ago

@aanon4 You're the best. Thank you, I will try that now!

mikewen commented 9 years ago

Are you sure 9600,N,8,1,N work?

I tried SERIAL 9600,N,8,1,N , console shows Error, then I looked at : OS_serial_open // Only support port 0, no-parity, 8-bits, 1 stop bit if (port != 0 || parity != 'N' || bits != 8 || stop != 1 || flow != 'H') { return 3; }

aanon4 commented 9 years ago

Apparently not :-(