PSoC™ 5, 3 & 1 Forum Discussions
I know that if I have not assign any pin in my psoc creator project, creator will automatically assign them to suitable pins available.
I created a project in which Vddio2 = 3.3V and all other voltage = 5V. I want to know that is there any way to ensure that "PSoC creator doesn't assign any pins to 3.3v bank of psoc" ? I will manualy assign pins to 3.3v bank.
Show LessHi to All,
I'm using the DS ADC in single-ended mode, 13-bit resolution, internal 1.024V reference, input range from 0 to 6*Vref, buffer mode tuned to R/R and the buffer gain set to 4. The ADC is fed with a constant 1.3V DC.
This setup should force the full range on the ADC, therefore 8191 lsbs (in fact around 8520 triggered by the compression/expansion mecanism in the modulator which is explained in the datasheet of the component).
However the displayed value stops at 6200 lsb even if I sligtly increase the input voltage.
On the other way if I go down to 0V (very closed to the analog floor) , the ADC is able to display 2 lsbs.
Any clue or idea about this behavior?
Michel
Show LessHi there !!!!!
I woluld need again your help!
I am triyng to read on display module four FSR ( force sensing resistor) and they look lik NTC thermistor in relation to resistance versus physic exitation. In this case exitation is a finger tip touch.
I have multiplexed them to a ADC_DelSig_v3_09 and I have used harward multiplexer.
I have atacched a bunddled zip with the proyect.
The TIA has an output of vdd/2 when any FSR is pressed, and vout can reach 0 V depending on the strenght of the touch can be.
So the input range of my ADC is 3.3 V/2 to 0v.
The result is the four redout are 0x00008104 always , which it seems to be correct when any FSR is pressed.
But it does not work when I press any of the FSR.
I would apreciate any help
Thank you very much.
Show LessMy Intent: Develop a UDB datapath which compares values. A byte is written into the Fifo F0 register via Software or DMA if it is empty, which clears the F0_Empty flag. The written byte is then read into the datapath A0 register, which should raise the F0_Empty flag again, and compared to a pre-determined value. If the value doesn't match it is written from the A0 register into the F1 register, which will trigger an external read via Software or DMA by raising the "Not_Empty" flag.
Problem Statement: Moving the contents of the fifo F0 register into A0 via my udb state machine does not re-raise the F0_Empty flag. It seems that when I read the data from F0 with A0 the read/write pointers are not updated, and thus neither is the status of the empty flags.
I've Tried: I have confirmed that once written (in the very first state of my state machine), the F0_Empty flag goes from high to low as expected. I have confirmed that the data I send makes its way into register A0, which means A0 is definitely retrieving the data as expected.
Possible Areas of Concern: The Fifo's in the udb are 32 bits, could that mean that even if I only write 8 bits, there are 24 bits of zero padding being written into the Fifo, which incremented the write pointer by 4, and thus requires 4 reads to empty the Fifo? This is the only thing I personally could think of, can anyone confirm this?
I thought this information would be enough to get moving, but I've attached a copy of my workspace archive in case anyone was curious. Thank you ahead of time for any help I recieve on this topic, I've been banging my head against a wall for 2 days now over this.
Show LessHi,
I'm working in a project where I need to adquire 53 bytes of samples which come from a digital IC periodically and then I need to save them in packets of 1431 bytes which is 27 packets of 53 bytes. Then, I need to send the 1431 bytes through the UART and I can't be sending one by one because I need to keep getting the next 53 bytes before I can send the 1431 so I want to use the DMA to transfer the 1431bytes through the UART without CPU intervention.
I haven't been able to do this becasuse the DMA is not working at all and I don't know why.
I've added the DMA component to my schematic. I use a array to store the 1431 bytes and once the array is full I call CyDmaChSetRequest(UART_DMA_CH, CPU_REQ); to start the DMA transfer.
I've tried to download the example here: http://www.psocdeveloper.com/forums/viewtopic.php?t=9435&p=40637 but de file is damaged onece downloaded.
The code I'm using to configurate the DMA is the following:
#define UART_DMA_BYTES_PER_BURST 4 // Size of the UART Buffer
#define UART_DMA_REQUEST_PER_BURST 0 //Automatically send rest of bursts
#define UART_DMA_TRANSFER_SIZE 1431 // Size of Samples frame
#define DMA_BURST_COUNT UART_DMA_TRANSFER_SIZE/UART_DMA_BYTES_PER_BURST // 1430/4 = 14
uint8 UART_DMA_CH;
uint8 UART_DMA_TD[1];
void UART_HANDLER_InitDMA(uint8 DMA_TX_Buffer[])
{
UART_DMA_CH = DMA_DmaInitialize( (uint8)DMA_BURST_COUNT, UART_DMA_REQUEST_PER_BURST, HI16(&DMA_TX_Buffer), HI16 (CYDEV_PERIPH_BASE) );
UART_DMA_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration( UART_DMA_TD[0], UART_DMA_TRANSFER_SIZE, UART_DMA_TD[0], TD_INC_SRC_ADR); //
/* Configure the lower 16 bit source and destination addresses
* Souce Address = Lower 16 bits of txBuffer array
* Destiantion address = Lower 16 bits of uart tx register
*/
CyDmaTdSetAddress( UART_DMA_TD[0], LO16((uint32)&DMA_TX_Buffer), LO16((uint32)UART_TXDATA_PTR));
/* Map TD to the DMA Channel */
CyDmaChSetInitialTd( UART_DMA_CH, UART_DMA_TD[0]);
/* Enable the DMA channel */
CyDmaChEnable(UART_DMA_CH, 1 ) ;
}
Show LessHi,
i need to create a PWM-Signal with 50 KHz to control a LED that expects a PWM-Signal with 50 KHz and TTL=5V.
I´ve set the System Clock to 24 MHz and use the following Dividers VC1=6, VC2= 4, VC3=20 to create the 50KHz.
Can I use an 8bit PWM-Module or do i need to use an 16bit PWM-Module? What value do i have to put in as "Period" ? I used 50000 on a 16 Bit Module, but i guess thats wrong.
So far i´ve written the following Code:
int i = 0;
PWM16_WritePeriod(50000);
PWM16_WritePulseWidth(0);
PWM16_DisableInt();
PWM16_Start();
M8C_EnableGInt ; // Turn on interrupts
SleepTimer_Start();
SleepTimer_SetInterval(SleepTimer_1_HZ); // Set interrupt to a
SleepTimer_EnableInt();
while(1){
for (i=0; i<=65535; i++)
{
//SleepTimer_SyncWait(2, SleepTimer_WAIT_RELOAD);
PWM16_WritePulseWidth(i);
PWM16_Start();
LCD_PrHexInt(i);
}
for (i=65535; i>=0; i--)
{
//SleepTimer_SyncWait(2, SleepTimer_WAIT_RELOAD);
PWM16_WritePulseWidth(i);
LCD_PrHexInt(i);
}
}
But the LED that i need to dimm shows no Reaction, the LED on the Eval-Board flickers in different Brightnesses, but not at 50 KHz, i can see it with my bare eye.
hopefully you get the problem i am describing,
Greetings from Germany, Patrick
Show LessHi everyone,
I have a function which is called in an interruption. I would like define the call of my interruption according to the duration of execution of my function.
Normaly to know simply the duration of execution I set a pin at the begining and clear the pin at the end of the function. I look on a oscilloscope the duration.
But at home I haven't osciloscope. Is there a simply method to know the duration? I have a UART to send data
Thank you
Show LessHi,
I have a issue with reading GPIO input value with the code as below:
// set P0[2] drive mode = highZ
PRT0DM2&=~0x04;
PRT0DM1|=0x04;
PRT0DM0&=~0x04;
//read P0[2] input to temp
BYTE temp=0;
temp |= (PRT0DR&0x04)<<7;
P0[2] is set as StdCPU. While I give a 5V input to P0[2] port, and expect the variable temp will have a value of 80h after executing the above code. However, the temp value is always 0. I am wondering it is the correct way to read the input of port P0[2]?
appreciate any help and suggestion.
Thanks,
cc
Show LessHello,
In a recent project I was attempting to dynamically allocate arrays within functions but the results I would get were not consistent or expected. After browsing the forums I found some mention (by the ailurophile forum frequent Bob) that in order to correctly allocate memory using malloc, a call to initmemset must be used. However, I could not find documentation on this function and so I do not know how to use it.
Is Bob correct in saying that malloc will not work without first calling initmemset? And if so, how do I correctly use initmemset?
Thank you,
Seamus
Show Less