How does one toggle/detect rts line ?

Curious how one would go about toggling the RTS line on/off and also detecting if the line gets toggled by another device as well ?

Also how does one get the status of the CD_Line ?

I’m trying to get things setup on uart1 so that I can read the modem status registers and perticularly the data carrier detect signal.

I’m not to sure what needs to be setup.

Please help.

echel0n:
Curious how one would go about toggling the RTS line on/off and also detecting if the line gets toggled by another device as well ?

Also how does one get the status of the CD_Line ?

RTS, CTS, DTR, DCD

Study up a bit on RS232 and what these mean, w.r.t. a DTE or DCE.

Then read the UART specs for the ARM you are using

Well a little more investigating into some things and I found that my board sends data to my pc perfectly at 9600 and 57600 but when setting the baud rate to 115200 it causes it to garble the data.

unsigned int divisor = get_uart_clk(1, OSCILLATOR_CLOCK_FREQUENCY) / (16 * baud);

thats what I use to determin my baudrate divider.

anyway of fixing this.

using a lpc2378 on a olimex board.

echel0n:
thats what I use to determin my baudrate divider.

anyway of fixing this.

Follow the advice that stevech already gave you and read the specs for the LPC2378 MCU. If you haven't already got a copy of the LPC23xx user manual download it NOW:

http://www.standardics.nxp.com/support/ … ?type=user

Section 4.12.1.2 of the manual includes a specific example of the recommended mul / div values for 115200 baud with a 12Mhz clock.

to be honest I’ve been basically just expanding ontop of some example code that came with the board via crossworks but then ran into a snag when I tried to make changes.

think it’s all stemming from the fact I’m using some files that came provided by crossworks specifically for my olimex board and I’m just not sure were to go from here.

I’d had loved to just started this right from scratch but I’m trying to learn and develope a device within months and I’m just behind the clock on this one so to speak.

I’d be willing to hire someone to develope the device I need but the code that I’d require to be designed is rather intricate and complex in many ways shapes and forms.

Anyways I’ll take his and you advice and read the manual but I’m gonna guess that it’ll only just cause issues as the existing code is in my opinon hinging on some other code thats provided by crossworks.

Thanks.

echel0n:
to be honest I’ve been basically just expanding ontop of some example code that came with the board via crossworks but then ran into a snag when I tried to make changes.

Making changes to code that you do not understand is a recipe for disaster.

echel0n:
I’d be willing to hire someone to develope the device I need but the code that I’d require to be designed is rather intricate and complex in many ways shapes and forms.

That would be my recommendation. The code that I've witnessed you struggling with over the past few weeks would have only taken an experienced C / LPC2xxx programmer hours (or a day or two at most) to complete. I'm not volunteering by the way - I'm not masochistic enough to get involved in C ;-)

If that is not feasible, now that you know where your weaknesses and strengths are, do yourself a favour and hide yourself away on a desert island for a month. Take with you a copy of the K&R C Reference Manual, the LCP23xx User Manual, the Olimex documentation code samples and an ARM Architecture Reference book Then, and only then, start doing some coding…

Well I belieave I can do this project as I learned vb.net on my own via trial and error and code very well with it now and have moved on to harder projects that encompess around it’s code.

As for c/c++ I just never bothered with it as I’ve always just been able to accomplish what I needed via vb.net till now.

The device I’m building needs to communicate with another device and the problems I’ve run into so far is when sending commands to the device it doesn’t seem to cauase the device to reply back to my arm chip so I’m not starting to think it’s all baud rate related and what not.

i’m gonna follow up on all the suggestions and just sit back and read for a bit and see what I can accomplish.

I’ve been working on the code lately and am impressed with what i’ve accomplished so far so. It’s just things such as vector interrupts and pll and things such as those that I’m completely lost for words with.

anyways I really think I’ll just dive into understanding more about initial basic requirements to get a project started up with and perhaps some sorta template to work off of in the near future to avoid disasters like these.

thanks all for the kind words and help.

p.s.

anyone that is interested in making some cash from me for coding up my project can contact me via pm.