Search found 36 matches

by pmgreene01
Fri Nov 21, 2025 10:51 pm
Forum: General
Topic: dsPIC33 Sample ADC synchronous with PWM
Replies: 1
Views: 50

dsPIC33 Sample ADC synchronous with PWM

I read that the dsPIC33EV that I am working with supports sampling an ADC channel synchronous with the PWM output. I want to do this to get accurate current sensing in a motor drive. I wanted to find out if Flowcode supports this configuration before trying to code it with a C-code block.
by pmgreene01
Thu Jan 18, 2024 2:59 pm
Forum: General
Topic: Trouble activating toolchain
Replies: 1
Views: 2231

Trouble activating toolchain

I just purchased the license to the Pic16 toolchain. I activated the key and then downloaded and installed the Pic16 toolchain. I have already successfully programmed some of the free targets and now I want to move to a paid target. So I have the MPLab software and my PicKit4 installed and working. ...
by pmgreene01
Sat Dec 23, 2023 4:42 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Re: Can't get program to run

I figured it out. I found the OSCCON register. Now it all works correctly. Thanks for pointing me in the right direction.
by pmgreene01
Sat Dec 23, 2023 4:09 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Re: Can't get program to run

As a follow on, I changed the Flowcode clock setting to 1mHz in "Project Options" and then created some interrupts. The interrupt intervals match up with the calculated intervals in Flowcode, so I think that this confirms the internal clock is running at 1mHz and not 48Mhz. The odd thing i...
by pmgreene01
Sat Dec 23, 2023 3:52 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Re: Can't get program to run

Thanks for responding. This is is my first PIC project, so I don't really know how to do that. I copied all of the #pragma statements from the autogenerated MPLAB code into a C-Block and disabled "Write Config on Download" and it is still slow. Using a scope and toggling outputs, it looks ...
by pmgreene01
Fri Dec 22, 2023 11:59 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Re: Can't get program to run

I am still stuck. I have gone through all of the configuration settings and something is still wrong with the clock. My LED blink time is 50x what it should be. I was able to configure the clock at 48mHz in MPLAB and verified that by defining an interrupt and checking it with a scope. I attached a t...
by pmgreene01
Fri Dec 22, 2023 7:34 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Re: Can't get program to run

I got it set up in MPLAB X and the MCC and can program the device with the PICKIT4. I can flash an LED and some other simple stuff. I then wanted to program it in Flowcode, so I moved over to Flowcode and set up the paths to my MPLAB compiler and the PICKIT4. As I said, it recognizes the chip and sa...
by pmgreene01
Fri Dec 22, 2023 5:32 pm
Forum: General
Topic: Can't get program to run
Replies: 10
Views: 9241

Can't get program to run

I am trying to make my first project with a PIC18F25K50. It is just a simple LED blink.

I am using a PICKIT4. The programmer sees the chip and says that programming is successful, but then nothing happens.

I attached my program and my log file.

Thanks.
by pmgreene01
Thu Dec 14, 2023 7:47 pm
Forum: General
Topic: Interrupts and SPI on Arduino Nano
Replies: 0
Views: 7102

Interrupts and SPI on Arduino Nano

I started writing this as a help request, but I found the solution, so I figured I would post my experience in case it might help someone else. I am using an Arduino for a simple analog servo. I sample an analog input and an analog sensor, perform a servo calculation and then send the output to an e...
by pmgreene01
Thu Dec 14, 2023 6:36 pm
Forum: General
Topic: ESP32 Can't sample ADC inside Interrupt Macro
Replies: 4
Views: 10175

Re: ESP32 Can't sample ADC inside Interrupt Macro

Thank you for the response. I will play with that approach.