Author |
Message |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Tue Jan 11, 2022 12:51 pm Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
OK, I have the USB detect pin enabled.
Here is the result:
I didn't touch on USB side at all.
Changed my previous config to following one:
// configure 12MHz clock for USB operation and 48Mhz CP ... |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Tue Jan 11, 2022 6:30 am Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
This device is not attached to USB all the time.
It takes 11.6 mA current now, my target is about 9 mA
Device never sleeps, not a battery powered. But on a sensitive power supply.
I think a clock r ... |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Tue Jan 11, 2022 5:31 am Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
How can I lower the clock of CPU on my current config?
CPUDIV4 didn't work.
I look for a lowest possible clock rate with 12 Mhz crystal which is my current config.
Now everything works on 48 Mhz, s ... |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Tue Jan 11, 2022 3:59 am Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
I understood for the HW side.
Isn't there any SW solution to turn off and on the usb?
Isn't it possible that CPU and USB (48Mhz) run on different clock rates? |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Tue Jan 11, 2022 3:06 am Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
1- Reduce CPU clock (but USB should work)
2- Disable USB when unplugged
I'm looking for a solution for those two options only.
The other details should not be important I think. When those two opti ... |
Topic: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
FFT
Replies: 48
Views: 142751
|
Forum: General CCS C Discussion Posted: Mon Jan 10, 2022 5:02 pm Subject: Request: USB HID Test code for 18LF14K50 12MHz [Solved] |
Hi,
I didn't want to create a new topic.
I have a working USB HID now. (with 12 Mhz ext crystal)
I need to reduce power consumption of the board.
Options are;
1- Reduce CPU clock (but USB sho ... |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Mon Jan 10, 2022 6:25 am Subject: Floating input pin issue [solved] |
Tested it.
This method works very nice even with low debounce time.
Thank you for your help. |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Mon Jan 10, 2022 4:01 am Subject: Floating input pin issue [solved] |
I liked the method.
But there is a problem, when the pin is low and button pressed, there is 10mA extra current consumption.
I making the pin low all the time looks a bit problematic in that case. ... |
Topic: AD5627 Dual Channel I2C DAC Driver |
FFT
Replies: 0
Views: 16339
|
Forum: Code Library Posted: Mon Jan 10, 2022 3:12 am Subject: AD5627 Dual Channel I2C DAC Driver |
Tested AD5627 Dual Channel I2C DAC Driver
/*
AD5627 I2C DAC Driver
AD5627R/AD5647R/AD5667R, AD5627/AD5667
Tested on AD5627BCPZ-REEL7
Dual channel I2C DAC
*/
/*
... |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Mon Jan 10, 2022 2:26 am Subject: Floating input pin issue [solved] |
Just use output_float, and drive:
So for B5:
//Set the pins low and drive them at boot:
output_drive(PIN_B5); //This sets TRIS to 0 on the pin
output_low(PIN_B5); //pin is ... |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Sun Jan 09, 2022 4:35 pm Subject: Floating input pin issue [solved] |
Do what I suggested, and drive the pins low all the time. Then release this,
wait a tiny moment, and test the pin. Then switch it back to driving low.
This means that what you have is a pin capacit ... |
Topic: strcmp strange length limitation [Solved] |
FFT
Replies: 3
Views: 17202
|
Forum: General CCS C Discussion Posted: Sun Jan 09, 2022 2:15 pm Subject: strcmp strange length limitation [Solved] |
Below, you are trying to create a pointer to a constant.
The compiler will give you an error. It will not compile.
if(strcmp((char *)TEST_VAL, (char *)&Buffer
Thanks! This fixed my issue ... |
Topic: strcmp strange length limitation [Solved] |
FFT
Replies: 3
Views: 17202
|
Forum: General CCS C Discussion Posted: Sun Jan 09, 2022 11:52 am Subject: strcmp strange length limitation [Solved] |
Hello,
The following statement is true TEST_VAL's char length is 4 or less
if(strcmp((char *)TEST_VAL, (char *)&Buffer[1]) == 0)
true when:
#define TE ... |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Sun Jan 09, 2022 11:02 am Subject: Floating input pin issue [solved] |
ARM have internal pull-downs, PIC have not. The confusion comes from there.
I have many assemblies and I don't want to solder that much resistors as @newguy mentioned.
I will add the resistors o ... |
Topic: Floating input pin issue [solved] |
FFT
Replies: 17
Views: 58271
|
Forum: General CCS C Discussion Posted: Sat Jan 08, 2022 9:27 am Subject: Floating input pin issue [solved] |
Yeah, I need pull-down resistors.
I just tried to have very long debounce time and seems it worked!
I incremented a variable when pin is high and zeroed it when pin is low,
after a threshold I ... |
|