PIC 18F452 project help :(

Status
Not open for further replies.
Hi everyone! Before I begin, I would like to say that this is my first post, I am a complete novice and suck at this stuff! Basically I have a storage oscilloscope project that needs to do the following:

When the button PB1 is pressed, the program has to capture and store 1000 samples of a signal connected to an analog input terminal of the oscilloscope. When the capture process is complete, the program has to repetitively replay the samples on the oscilloscope via the analog output terminal (DAC channel A). The beginning of each replay cycle should be marked by a brief synchronizing pulse (DAC channel B).

There's a bunch of other info but I first want to see if anyone is interested in helping me, which would be very nice. I have attached the code that my lecturer has helped me with which is relevant but still doesn't do what it needs to.
 
A storage scope!.. For a first project!... Is your lecturer in a bad mood?

This is a big ask... The last time I got involved with an oscilloscope project... well, it didn't bode well.

The pic18f452 hasn't got a DAC output so the replay signal wont be the same as the input signal.....
 
Haha well first project technically but we've been doing tutorials every fortnight and let's just say they didn't bode well either.
The output will be generated from a thingy on the oscilloscope as I understand it
 
I understand what is required.......... signal in to scope......... store..... carry on to scope...

It's possible with a parallel DAC on an 8 bit port with frequencies up to about 2khz... I wouln't go any higher with this pic.... Download the scope tutorial from EPE magazine then modify the output to a DAC rather than the screen....
 
Haha well first project technically but we've been doing tutorials every fortnight and let's just say they didn't bode well either.
The output will be generated from a thingy on the oscilloscope as I understand it

What the eff. First project and already this? What has the world come to?

You're going to need a PIC with both a Analog to digital converter (ADC) and a Digital to Analog Converter (DAC). WHich kind of PIC, you'll have to search on the Microchip side. I assume you'll want to stick to the PIC18 family.


THis is actually pretty helpful...if you know what your lecturer means by PORTB, INT1, INTCON3 and all the fancy stuff. You're going to need to read about interrupts, timers, ADC and DAC. I've done all of them on a 16F877A except DAC which the F877A doesn't support. Read the datasheets; it's ahuge help.
 
The 18F452 doesn't have a DAC and so I'm guessing it's external hardware. Do you have a schematic of the PicTrainer board? The chip also has only 1.5K of ram and so storing 1000 x 10 (1250 bytes) bit samples is going to be challenging. What language do you have to write this in?

Mike.
 
Yes the DAC is external hardware and no I don't have a schematic of the trainer board. The lecturer did say that we would have to find a way to store the 1000 samples in 2 different locations. Were writing this in assembly code and we're using MATLAB. I know what I need to do, I just don't know how to do it. Writing interrupts and interrupt handlers and what not is beyond me..
 
Like I said in post #4... John Bekker (RIP) made a simple storage scope... (The same as you require) for the EPE magazine " MAY 2001 " ..

Download the zip file ( it's in assembly ) and just have a look.... The code needs porting to the pic18f452 but atleast you'll get the idea.
 
Last edited:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…