EmbeddedRelated.com
Forums

square wave generation

Started by arun March 18, 2013
Hi,
I am using LPC2368 to generate 16 square waves of independent frequency. The program works well in simulation but there are no square waves generated in hardware. UART0 is used to get values which determines frequency of each wave. Please help. I'll upload the program file named 4timers.c

An Engineer's Guide to the LPC2100 Series

I took a quick look at the code you uploaded and I think you forgot to do some PINSEL's.
And never trust a simulator.

--
Kevin

--- In l..., "arun" wrote:
>
> Hi,
> I am using LPC2368 to generate 16 square waves of independent frequency. The program works well in simulation but there are no square waves generated in hardware. UART0 is used to get values which determines frequency of each wave. Please help. I'll upload the program file named 4timers.c
>

Please look at this
linkand
reply Do you need this example working on LPC?!

I can compile it with gcc for you for LPC2368 and give a project.

2013/3/18 arun

> **
> Hi,
>
> I am using LPC2368 to generate 16 square waves of independent frequency.
> The program works well in simulation but there are no square waves
> generated in hardware. UART0 is used to get values which determines
> frequency of each wave. Please help. I'll upload the program file named
> 4timers.c
>
> --
CMake build environment project
for micro-controllers (use
it or
addyou
favorite MCU )


email list test

________________________________
From: Dimitriy irtos
To: l...
Sent: Wednesday, March 20, 2013 2:07:25 PM
Subject: Re: [lpc2000] square wave generation


 
Please look at this
linkand
reply Do you need this example working on LPC?!

I can compile it with gcc for you for LPC2368 and give a project.

2013/3/18 arun

> **
> Hi,
>
> I am using LPC2368 to generate 16 square waves of independent frequency.
> The program works well in simulation but there are no square waves
> generated in hardware. UART0 is used to get values which determines
> frequency of each wave. Please help. I'll upload the program file named
> 4timers.c
>
> --
CMake build environment project
for micro-controllers (use
it or
addyou
favorite MCU )






Thanks for the response...
I can access the chip only after few days..
I'll test and then post about the output..

 
Arun
________________________________
From: Kevin
To: l...
Sent: Monday, 18 March 2013 6:56 PM
Subject: [lpc2000] Re: square wave generation


 
I took a quick look at the code you uploaded and I think you forgot to do some PINSEL's.
And never trust a simulator.

--
Kevin

--- In l..., "arun" wrote:
>
> Hi,
>
>
> I am using LPC2368 to generate 16 square waves of independent frequency. The program works well in simulation but there are no square waves generated in hardware. UART0 is used to get values which determines frequency of each wave. Please help. I'll upload the program file named 4timers.c
>




This code can generate signals of different duty cycle.... 
But i need different frequencies, and i need 16 such outputs...
Thanks anyway...
 
Arun
________________________________
From: Dan Abc
To: "l..."
Sent: Thursday, 21 March 2013 6:20 AM
Subject: Re: [lpc2000] square wave generation


 
email list test

________________________________
From: Dimitriy irtos
To: l...
Sent: Wednesday, March 20, 2013 2:07:25 PM
Subject: Re: [lpc2000] square wave generation
 
Please look at this
linkand
reply Do you need this example working on LPC?!

I can compile it with gcc for you for LPC2368 and give a project.

2013/3/18 arun

> **
> Hi,
>
> I am using LPC2368 to generate 16 square waves of independent frequency.
> The program works well in simulation but there are no square waves
> generated in hardware. UART0 is used to get values which determines
> frequency of each wave. Please help. I'll upload the program file named
> 4timers.c
>
> --
CMake build environment project
for micro-controllers (use
it or
addyou
favorite MCU )








Hi

I included all the PINSEL's and tried but still no output.
 
Arun
________________________________
From: Kevin
To: l...
Sent: Monday, 18 March 2013 6:56 PM
Subject: [lpc2000] Re: square wave generation


 
I took a quick look at the code you uploaded and I think you forgot to do some PINSEL's.
And never trust a simulator.

--
Kevin

--- In l..., "arun" wrote:
>
> Hi,
>
>
> I am using LPC2368 to generate 16 square waves of independent frequency. The program works well in simulation but there are no square waves generated in hardware. UART0 is used to get values which determines frequency of each wave. Please help. I'll upload the program file named 4timers.c
>




Some one please help..
 
Arun
________________________________
From: arun
To: "l..."
Sent: Saturday, 30 March 2013 12:42 AM
Subject: Re: [lpc2000] Re: square wave generation


 
Hi

I included all the PINSEL's and tried but still no output.
 
Arun

________________________________
From: Kevin
To: l...
Sent: Monday, 18 March 2013 6:56 PM
Subject: [lpc2000] Re: square wave generation
 
I took a quick look at the code you uploaded and I think you forgot to do some PINSEL's.
And never trust a simulator.

--
Kevin

--- In l..., "arun" wrote:
>
> Hi,
>
>
> I am using LPC2368 to generate 16 square waves of independent frequency. The program works well in simulation but there are no square waves generated in hardware. UART0 is used to get values which determines frequency of each wave. Please help. I'll upload the program file named 4timers.c
>






--- In l..., arun wrote:
>
> Some one please help..
>  
> Arun
You posted a file containing 773 lines of code (including blank lines and comments). NOBODY is going to try to wade through that much code!

If you posted something like 20 lines of code, maybe someone would dig through it. For example, why bother with code for all the motors when none of the motors work? Why have several interrupt handlers when none of them work?

Nowhere in all of that code is there any comment about what is supposed to happen. There are quite a few low level comments but nothing describing the 'big picture'.

I'm not sure anybody wants to put that much time into understanding your project. Cut it down to the bare minimum. Twenty or thirty lines MAX. BTW, programs are usually written that way as well. First you get a little thing to work, then you get a bigger thing to work.

Richard

ok..

but

the program with 8 square wave output (which is about half the size of this program) works....
though this is just an extension of the same program which uses 4 timers instead of 2 does not work...

Arun