New answers tagged

0

float PIcal(float setpoint, float actual_voltage); { In above statement just delete {, Delete one } at the end of your main function Define the function float PIcal (float setpoint, float actual_voltage) { ..... } above and outside the main function


0

Black dots do NOT indicate nodes. They are visual markers. A node is the complete interconnection between circuit elements. There are four nodes in your circuit. An essential node a node where three or more elements meet. There are three essential nodes in your circuit. The bottom-most node in your circuit is one of three essential nodes.


1

Point 1. Your #endif is at the end of the block of code. Essentially you are telling the compiler not to compile anything if PID_H is NOT defined. Try using #ifndef PID_H instead of #ifdef PID_H Point 2. You can't declare PIcal() inside main()! Use something like... ... float PIcal (float setpoint, float actual_voltage) ; void main(float output) { ...


0

You have defined variables Hour, Min, Sec and Msec, but you aren't using them. Instead you just increment Bottom_Value on each timer tick, then convert it to decimal digits for display. The problem with this technique is that Bottom_Value only counts the number of milliseconds, so when you convert it to decimal you get illegal time values when the seconds or ...


0

Figure 3-2 indicates that there's four clock cycles in one instruction cycle. The third column in table 9-2 (Cycles) tells you how many instruction cycles each instruction needs; most of them take 1, but some take 2. The ones with parentheses take 1 cycle if the next instruction isn't skipped, 2 if it is. Look up the instructions you're given on the test ...


0

This helped. Gave up on using the MCC stuff for this, other than the clicked-together basic peripheral init stuff. (Note that in the microchip official forum it was said the MCC I2C library is currently changing and not tested a lot) I basically just added a further parameter to indicate whether I want to use stop,start; or restart (aka repeated start ...


-2

Check out this forum post. The question asker has a similar problem communicating with an I2C peripheral via MCC generated code and seems to get it solved.


0

to summarize: select the correct device under : Project Properties\Conf:[default] include xc.h That's all. Every SFR should be defined know.


0

Carefully check all items of chapter 2, also the very first bullet (which may cause your issue) The following is a list of pin names, which must always be connected: - All VDD and VSS pins (see 2.2 “Decoupling Capacitors”) You write you only connected pin 2 and 15. The connection to pins 16&36 you write about only count when you turned on the ...


4

This would only affect you if you are using the SMBus. The proper spec is as follow (from the datasheet): In the errata the actual performance is described: So it meets the SMBus spec if Vdd is > 4V. If Vdd < 4V (down to 2.7V) it may be as low as 0.7V. In practice this would likely mean a reduction in noise margin rather than a failure, and only if ...


2

"Input low voltage threshold level is dependent on VDD." This means that the microcontroller does not use an internal reference voltage source for Low input signal comparison. Below there is an example of behavior at VDD = 5V. In case You power supply voltage change let's say from VDD=5.0V to VDD=4.5V [-16%] the Signal Low area might change aswell from &...


0

At Power On the CMCON register ist set to 0x00, this means the pins GP0 and GP1 are set to analog. If you want to use them as digital pins you had to set the CMCON register to 0x07h.


0

Disabling the comparator did the trick. Though i thought about it yesterday, forgot to implement it. It is working as expected after setting the CMCON = 0x07; Thanks to Mike and Dan1138 for your support and advise.


Top 50 recent answers are included