Author |
Message |
Topic: how to combine this program ? |
juanodiy
Replies: 3
Views: 4985
|
Forum: General CCS C Discussion Posted: Mon Nov 12, 2012 2:07 am Subject: how to combine this program ? |
well, so many things you can do, if you are using rs232 i suppose you want to connect to a PC or something, so for join the programs one solution can be:
void main()
{
if(kbh ... |
Topic: How to separate an 8 bit int |
juanodiy
Replies: 14
Views: 13731
|
Forum: General CCS C Discussion Posted: Wed Nov 07, 2012 10:22 am Subject: How to separate an 8 bit int |
Ok, thanks to both, look I'm gonna show you my advance,
#include <18f452.h>
#device adc=8
#use delay(clock=20000000)
#fuses HS,NOWDT,NOPROTECT,NOLVP
#include <math.h>
# ... |
Topic: How to separate an 8 bit int |
juanodiy
Replies: 14
Views: 13731
|
Forum: General CCS C Discussion Posted: Tue Nov 06, 2012 11:23 pm Subject: How to separate an 8 bit int |
Ok, thanks mike, I'm trying to do a comparison, between 3 arrays.
For example: I need to modulate a 16-QAM signal; this modulation use 4 bits, thats what I need to separate them, then I need to com ... |
Topic: How to separate an 8 bit int |
juanodiy
Replies: 14
Views: 13731
|
Forum: General CCS C Discussion Posted: Mon Nov 05, 2012 11:20 pm Subject: How to separate an 8 bit int |
First of all, thanks for your time. I already have used the function swap, indeed it works, but I want to copy to a char vector. Here is my example:
#include <18f452.h>
#device adc=8
#use d ... |
Topic: How to separate an 8 bit int |
juanodiy
Replies: 14
Views: 13731
|
Forum: General CCS C Discussion Posted: Sun Nov 04, 2012 10:32 pm Subject: How to separate an 8 bit int |
I think I could use these operators "<< >>", but if I want every bit in every position of a vector I don't know how, please any idea will be great. |
Topic: How to separate an 8 bit int |
juanodiy
Replies: 14
Views: 13731
|
Forum: General CCS C Discussion Posted: Sun Nov 04, 2012 9:11 pm Subject: How to separate an 8 bit int |
Hi, again asking for help, I have a problem separating an 8 bit int. I am doing a QAM modulator with PIC 18f452.
The 16 QAM modulation use 4 bits, if i want to modulate a PCM word, with 8 bits, i ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Wed Sep 19, 2012 10:08 pm Subject: Greats |
Thanks to all, in special to Ttelmah, I can do it finally , I learn so much with this, and Ttelmah you are a genius man, really you are a master, thank you very much for your help, and thanks to the ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Tue Sep 11, 2012 12:44 am Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
Using SPI, you could use a single other line as a 'A/B' identifier, and change this according to which channel you are sending, allowing the slave device to always 'know' which channel it is receivi ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Tue Sep 11, 2012 12:39 am Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
The easiest way would be to use hardware SPI to send the data from PIC
#1. Then in PIC #2, call the spi_data_is_in() function in a loop.
If PIC #2 receives a byte, then call spi_read() to read i ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Tue Sep 11, 2012 12:26 am Subject: SPI |
Hi I have changed the code using SPI but it does not work, when I'm trying to simulate the proteus show me a large number of messages, the messages says:
"Stack overflow is forcing device res ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Mon Sep 10, 2012 10:05 pm Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
The obvious question is 'how are your sending this'?.
With the PSP, you need a select line to be strobed by the sending device to trigger the transfer.
Effectively your master needs to hold the WR i ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Sun Sep 09, 2012 10:38 pm Subject: PSP |
I appreciate any information about psp (Parallel Port). I'm trying to recieve data like this way, but it doesn't work.
The code is below:
#include <18F452.h>
#fuses HS,NOWDT,NOPROTECT,NO ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Sun Sep 09, 2012 5:14 pm Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
As a comment, you are not going to sample the signals at 50000Hz, with this PIC.
Sampling an ADC channel, takes:
Tacq (the time needed for the signal to acquire, and charge the internal capacitor ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Sun Sep 09, 2012 5:09 pm Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
First of all, i really appreciate that you have been reading my post. In my country there is not information about this topic, your answers show your knowledge. Thanks very much.
Your project con ... |
Topic: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
juanodiy
Replies: 17
Views: 31731
|
Forum: General CCS C Discussion Posted: Sat Sep 08, 2012 11:47 am Subject: Multiplexing PCM data from 2 channels A/D CHANNEL (SOLVED) |
Hi, i solved the problem and the pic 2 is multiplexing in the same time as the data arrives, but now i'm trying to increase the sampling time, and when I do that, the multiplexer does not work because ... |
|