Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
FYI, I'm using an MPLAB..um..PM 3 burner? I'll check exactly soon. Finally heading back to the lab, really hope these new chips work. Or else I'm out of ideas. I'll try activating PLL too, though.
I've finally attached a picture of the setup. The setup is the only thing I can think that may be wrong right now. As you can see it is very simple. It is nothing but the 3 VDD and 3 VSS connections. And an oscilloscope on some pin. That and I pulled MCLR (pin 1), up to 5V using a 5K resistor...
I know right? I agree.
I just compiled your code and tested it in the debugger/simulator. Like you said, I could see RD0 (pin 23) going high and low. For whatever reason, PORTB will not go high or low no matter how I write to it (RB0, LATB0, LATBbits.LATB0, whatever), but that must be another...
I see you're right, Kent. I could have saved myself some time if I'd read your previous post more thoroughly. I'll adopt your configuration and try out this code. I'm not familiar with the LATD/LATC/LATE though. How does it differ from PORTD/C/E, and why do you turn it on and off PORTD0 instead...
Okay, so after a lot of pouring over the internet, I've figured out how to work the Configuration Bits in the high tech c compiler. It's now in my code below - except that I have not been able to figure out how take off code protection. Unfortunately, even in simulation, when I try to write...
Backing up a lot, as it turns out I can't even get even turn an LED on and off - namely, I can't turn a pin high and lo. I attempted to tell PORT B Pin 0 to go high, and I couldn't even do that - in the MPLAB simulator (MPLAB SIM), let alone on the protoboard itself. Wow. I guess there is some...
Definitely right, my proff just said the same thing. Going to try bit banging to see if I can't at least get an LED to blink/pin to go high.
A question about the hitech include file - we need that on top of the individual device include file? Also, I had configured the settings in the...
Edit//Update:
Man. I was CERTAIN it was going to work this time. I rewrote my code, effectively transferring this guy's complete code into Hi-Tech C. I rechecked all the connections on my microcomputer. I replaced the microcomputer, just in case. My code now looks like this:
And still, no...
Wow, this is amazing. Finally able to get back in the lab and test this out. It's possible my code isn't working because I wasn't doing any configuring like he does in his PWM code. I'll also try individually writing to the bits he wants to turn on, instead of writing to the entire register. I...
Hi Nickelflippr,
WHen you say a basic blinky LED, do you mean one turned on and off by a PWM signal - because that would be great. If I could get that happening, I would see whatever code I am missing to make PWM work, and probably be able to modify it to get the frequency/duty cycle I need...
Okay, I've got to be close. I realized my chip wasn't powered correctly, fixed that and thought it must work, but still nothing.
Include file is chip-specific.
PTCon is set to free running.
I used equation 15-1 to calculate that PTPER should be 39,999 for a period of 2 ms, which the Victor...
Thanks a lot smanches, I think this is going to be really useful. I'd add the include file, write to the P1DC1 registers, make sure to enable PWM1 by writing to the PTEN bit, and see where this takes me and let you guys know the result.
Okay, interesting. I'll try writing the code a bit more like you do. You set a PWMEN2 On, which you comment turns on the PWMs. Do you know if there is something analogous for the dspic30f? One of my above questions was whether there was something I needed to write to to enable the pwm registers...
Thanks a lot, I'm not sure how I didn't find that. This will help. I'll start reading through the manual to figure out what the input oscillator time base period is.
I should clarify. The documentation is very in depth on the individual registers, and what bits control what, etc. What I am...
Hi,
I am trying to figure out how to use the PWM Motor Control Mode for my dsPic30F4011. I am trying to send a signal with a period of 2 microseconds. The problem is I have no idea how. I've poured through the dsPic manual and the motor pwm module manual, but the documentation is just not...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.