Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Writing and Reading memory at same time

Status
Not open for further replies.

ravimd

Newbie level 4
Joined
Mar 2, 2012
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,345
Hello All,

I splited my microcontroller (PIC24F) memory in to two segments using array.
I am writing data in to both memory location one after other. So my question is "can i read (for sending through UART) the data from the 1st memory location at the same time when i am writing data in to 2nd memory location (if the read and write speeds are almost same) ?

Because i am monitoring the ADC module and from there i am getting the value to write to the memory. If i cant monitor and read the value of ADC at the time of reading and sending data through UART, i will lose my precious data.

Is there any alternate solutions ? Or will this idea work ?

I need expert solution.

Loving Electronics :smile:,

M.D.N
 

As long as you are using a single core to do both operations, it should be fine. Not quite sure if your ADC DMAs the converted value to memory directly. In that case, consult the datasheet. What exactly is your PIC part number?

May be, an algorithmic representation of your what and how you're doing would help getting better answers, I guess.

If I read it correct, you are:

1. Reading from the ADC and storing in a memory location
2. Sending the value via UART
3. In the meantime, if your ADC gives another value - store it at an alternative location and move it via UART.
4. This switching happens between both locations.

Assuming your ADC conversion rate is less than your UART transmit rate, you might not need to worry much. If your UART transmit rate is less than ADC conversion rate, then you have to either:

* Reduce the ADC sampling rate (or)
* Increase the baud rate of UART
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top