Search found 38 matches

by ICAC210
Mon Jun 08, 2009 11:51 am
Forum: Everything ARM and LPC
Topic: LPC 2000 flash utility problem
Replies: 9
Views: 4232

Hi, I have the exact same problem now. It gives the "can not communicate with the test board" error and i don't know why its happening.

My LPC2138 is already on the PCB, can anyone tell me what programmer i can get in order to program it? Thanks.
by ICAC210
Thu May 21, 2009 10:11 am
Forum: Everything ARM and LPC
Topic: I2C Problem!
Replies: 2
Views: 1270

I tried to set SCL and SDA as GPIO output pins and SDA works, but SCL does NOT? which would explain why the I2C doesn't work i believe. One question, when SCL and SDA are initialized as I2C, do I still need to config the IODIR for those two pins as output? I am looking at some sample codes and they ...
by ICAC210
Tue May 19, 2009 2:53 pm
Forum: Everything ARM and LPC
Topic: I2C Problem!
Replies: 2
Views: 1270

I2C Problem!

Hi, I am working on I2C with LPC2138. The problem I have is I can not see anything on SCL and SDA on the scope. When I set the I20SCLL and I20SCLH, shouldn't I see SCL running at least? I have troubleshooting to the point that I know it is entering and exiting I2Caddressing(), as well as writeI2C an...
by ICAC210
Sun Mar 29, 2009 8:35 am
Forum: PIC Microcontrollers - Software and Hardware
Topic: Timer in PIC18F2455
Replies: 3
Views: 922

Timer in PIC18F2455

Hi,
I am trying to make a timer with PIC18F2455. What I want to do is something similar to an interrupt that will let me know when every 5ms has passed. I am a little confused with timer0, timer1, etc and not sure which to use. Can anyone help? Thanks.
by ICAC210
Sun Mar 22, 2009 4:55 pm
Forum: PIC Microcontrollers - Software and Hardware
Topic: PIC18F2680 <-> Xbee
Replies: 8
Views: 3204

You need to make sure your delay is good for your guard time, so you need to be sure about your clock rate. Also, you need to make sure Xbee DI buffer is not out of capacity when sending the command, this is when CTS comes into play.
by ICAC210
Sat Mar 21, 2009 2:01 pm
Forum: Wireless/RF
Topic: Sending AT Command in C to Xbee?
Replies: 3
Views: 984

Sending AT Command in C to Xbee?

Can anyone look at the code see if what's wrong with this? I am sending AT command to xbee to change the PANID to 11 Delay10KTCYx(0); //213 ms per delay Delay10KTCYx(0); //need 1 second Delay10KTCYx(0); Delay10KTCYx(0); Delay10KTCYx(0); TXREG = 0x2B; //"+++" TXREG = 0x2B; TXREG = 0x2B; Delay10KTCYx(...
by ICAC210
Fri Mar 20, 2009 6:38 pm
Forum: Code Snippets
Topic: Delay in C
Replies: 1
Views: 1982

Delay in C

What is the easiest way to delay for 1 second in C?
i tried to include the <windows.h> to use sleep function but it doesn't find it in MPLAB. Is there other way to do this? Thanks.
by ICAC210
Fri Mar 20, 2009 9:43 am
Forum: Code Snippets
Topic: PIC sends data into xbee
Replies: 7
Views: 8166

I was testing to send xbee to the XCTU WITHOUT CTS flow control and data were all good in the terminal. Does that mean I do not have overflow problem at the sending end and I don't need to worry about CTS? When hooking up my another Xbee with PIC, the receiving data is wrong, so I think RTS is neede...
by ICAC210
Fri Mar 20, 2009 9:02 am
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

I figured out the problem, finally. My baud rate was at 19200 going into XBee, not 9600. I have a question, if i have 3 xbee sending data to my host xbee, do i have to operate in API mode? Would transparent mode work? If so, how does the host xbee distinguish which data is from which xbee? OK on th...
by ICAC210
Thu Mar 19, 2009 11:14 am
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

I figured out the problem, finally. My baud rate was at 19200 going into XBee, not 9600.

I have a question, if i have 3 xbee sending data to my host xbee, do i have to operate in API mode? Would transparent mode work? If so, how does the host xbee distinguish which data is from which xbee?
by ICAC210
Thu Mar 19, 2009 3:01 am
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

where's the code that loops until the UART TX buffer is ready for another byte? Or waits for a TX buffer empty interrupt? I used another while loop with UARTWrite inside and I am reading values from accelerometer within the loop. This causes some delay in the UART transmission (u can see the idle 1...
by ICAC210
Wed Mar 18, 2009 10:52 pm
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

where's the code that loops until the UART TX buffer is ready for another byte? Or waits for a TX buffer empty interrupt? I used another while loop with UARTWrite inside and I am reading values from accelerometer within the loop. This causes some delay in the UART transmission (u can see the idle 1...
by ICAC210
Wed Mar 18, 2009 9:25 pm
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

Hi, This is very strange. I change the code so that it only transmit once to XCTU, but it's still reading the wrong data!! I tried to send 1F and I see F3 at the terminal? This means its not the flow control that was causing the problem. I checked the UART pin on the oscilliscope and it is correctly...
by ICAC210
Wed Mar 18, 2009 2:14 pm
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

Here is my sending code SPBRG = 0b00011111; //decimal 31 to set baud rate to 9600, clock=20MHz RCSTAbits.SPEN = 1; TXSTAbits.SYNC = 0; TXSTAbits.TXEN = 1; BAUDCONBITS.TXCKP = 0; data[2] = 0xCC; while (1) UARTWrite(&data[2]); void UARTWrite(unsigned char* xbee) { TXREG = *xbee; } where's the code th...
by ICAC210
Wed Mar 18, 2009 10:30 am
Forum: Wireless/RF
Topic: Error Receiving with Xbee
Replies: 14
Views: 4333

Here is my sending code
SPBRG = 0b00011111; //decimal 31 to set baud rate to 9600, clock=20MHz
RCSTAbits.SPEN = 1;
TXSTAbits.SYNC = 0;
TXSTAbits.TXEN = 1;
BAUDCONBITS.TXCKP = 0;

data[2] = 0xCC;
while (1)
UARTWrite(&data[2]);


void UARTWrite(unsigned char* xbee)
{
TXREG = *xbee;
}