On Fri, Dec 21, 2012 at 6:43 PM, Sean Dekker <[email protected]> wrote:
> > Dear Eric, > > I have soldered the RX pin of the device which should be interfaced, to > PIN#24 of FT232BL. Hem. On the schematic I have (and which I sent to you), U20 is listed as FT232BM rather than FT232BL. So that is weird. Are you looking at U20? Why do you think it is a FT232BL? > This way as I mentioned in my pervious email, it is possible to send bytes > using 'printf' function to the sensor. > Instead of using printf and scanf or whatever, try writing code that sits directly on top of the h/w. You can find the low level information in the users manual, <http://www.ti.com/lit/ug/slau049f/slau049f.pdf> you want chapter 13 USART/UART. And then look at the associated bits defined in /usr/msp430/include/msp430f1611.h. You can access the control registers defined directly from C code in the nesc module. what toolchain are you using? 4.6.3? What version of tinyos are you running? The idea is you get the low level h/w working directly. Then figure out how to get tinyos to talk to the h/w the way that you need. But first make sure the h/w is working the way you want. Divide and conquer. > That device is using 5V CMOS level Which device? Please use U numbers. The schematic I have lists the FTDI chip as the FT232BM but you are referencing the BL part. I've looked a little bit at the data sheets and it looks like the BM part has automatic level shifters while the BL is a 5 V part. So I question your use of a level shifter. > , so I connected the wire that comes from PIN#24 of FT232BL to a 3.3 to 5V > level shifter, Since I think pin 24 of FT232BL comes from PIN#2 from BUFFER > chip. > 24U20, RXD is data going into U20 so is data going off board. This is connected through 3U29 to 5U29 which then connects to UART1TX 34U0 (P3.6). So this is the UART TX pin coming out of the cpu. I don't know why you think you need a level shifter. > I have done the same thing with TX of my device, I have connected it > PIN#25 of FT232BL, I am pretty sure that pin is going to UART1RX of MSP430. > 25U20 is TXD (transmit data out of the FTDI chip going into the cpu), connects to 2U29 to 6U29 (UART1RX) then goes to 35U0 (P3.7). > Now, after a week, I was not able to receive any data in TinyOS from UART1. > >From the PC side write a little program that throws a single char (I usually use 'U' , 0x55 or 0xAA). Look at tools/tinyos/misc/tos-serial-debug.c. That program reads and you will have to tweak it to read from /dev/ttyUSB<n> as well as write infinite chars. Then on the mote side after initializing the UART h/w.... try sticking the following into the start code so it executes and see what it sees. while (1) { if (IFG2 && URXIFG1) { /* stash byte */ *(buf_p++) = U1RXBUF; /* will also clear the RXIFG flag */ } } Or something like that. Then stop the processor after sending some number of char from the PC side. And see what you've got in the buffer. You should protect the buffer so you don't run off the end. I usually write the code so the buffer is circular. > > I tried to use component "Msp430Uart1C()" but it receive event seems to do > nothing. > > I would really appriciate if you or other people who are reading my email > to give me some help in this regard. > It is extremely difficult to debug h/w issues via email. > > I wish there was something like `scanf()` fucntion which could let users > to read from UART1. > scanf wouldn't help in this case... > > Regards, > Sean. > > > > ----- Original Message ----- > > From: Eric Decker > > Sent: 12/19/12 02:30 PM > > To: Sean Dekker > > Subject: Re: [Tinyos-help] Using UART1 instead of UART0 > > pin 24 of U20? The FT232BM? > > If so that is RX and connected to UART1TX so you probably have the sense > of the pin wrong. > > UART1 uses P3.6 and P3.7. You will have to figure out how to mess with > it to get the USART doing the right thing. > > > On Wed, Dec 19, 2012 at 4:45 AM, Sean Dekker <[email protected]> wrote: > >> >> Dear Eric, >> >> I directly soldered a wire in TX and RX pins of FTDI chip on telosb. Now >> I can send bytes using the following command without the need to stop radio >> first. Its working very fine: >> >> printf("%c%c%c", byte1, byte2, byte3) >> >> I have also soldered a wire to the RX pin of FTDI chip. But I do knot >> know how can I receive bytes. Can you please tell me which interfaces >> should I use in this case? >> >> Regards, >> Sean. >> >> >> >> ----- Original Message ----- >> >> From: Eric Decker >> >> Sent: 12/14/12 06:22 AM >> >> To: Sean Dekker >> >> Subject: Re: [Tinyos-help] Using UART1 instead of UART0 >> >> >> Should work. You'll want to study the schematic and make sure that the >> USB circuit won't mess with your use of the UART1 circuits. >> >> On Thu, Dec 13, 2012 at 2:36 PM, Sean Dekker <[email protected]>wrote: >> >>> Hi all, >>> >>> It's almost 2 months that I am trying to make a reliable app that can >>> work with both UART0 and RADIO. As you know they are shared and it requires >>> a lot of hassel to make them work. >>> >>> My last idea that partly work was when required to send to UART0, I stop >>> the RADIO, send bytes then I start RADIO again. But this way I have no idea >>> how to receive bytes through UART0 while radio is ON. Infact I need to >>> check some sensor values using UART0 and when they are at certail level I >>> should send warning using UART0 and then using RADIO to a base >>> station...this is really hopeless I am giving up! >>> >>> My last idea is using UART1...I mean the uart that is connected to the >>> FTDI chip. Since I think it works great I have tested it with printf >>> function and stuff and it does not have problem with radio. >>> >>> My idea is to find the UART1 pins of msp430 and use them instead of >>> UART1. >>> >>> Do you recommend such thing? >>> >>> Regards, >>> Sean. >>> >>> >>> >>> _______________________________________________ >>> Tinyos-help mailing list >>> [email protected] >>> https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >> >> >> >> >> -- >> Eric B. Decker >> Senior (over 50 :-) Researcher >> >> >> >> >> > > > > -- > Eric B. Decker > Senior (over 50 :-) Researcher > > > > > > -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
