# Tag Info

36

An illustrative example or two may help here. Take a look at the following hypothetical circuit: simulate this circuit – Schematic created using CircuitLab Suppose to start both A and B are high (1). The output of the AND is therefore 1, and since both inputs to the XOR are 1, the output is 0. Logic elements don't change their state instantly - ...

24

I think I've found your problem, and (I know you won't like this) an accurate schematic would have highlighted the problem to (at least some) readers straight away. :-) Looking at the starting voltage on the two pins in your two traces above, that voltage is around +3.3V. That tells me the PIC is powered from that voltage. Then we see the voltage rise to +...

21

I feel a lot of these answers are not exactly hitting on the core question. The micro-controller has a clock simply because it executes (and is driven by) sequential logic. In digital circuit theory, sequential logic is a type of logic circuit whose output depends not only on the present value of its input signals but on the sequence of past inputs, the ...

19

The CAN pins do not have fixed pin assignments. Instead you are able to select which of the "Remappable Pins" you wish to use (RP0 through RP15). If you refer to page 180 of the datasheet, specifically the table titled "REGISTER 11-16" (RPINR26: Peripheral Pin Select Input Register 26), it details the register used to select the CAN RX pin location (C1RXR). ...

16

I would not write every event to EEPROM. Most of the time you will have power, so keep the live count in RAM. The amount of energy it takes to save the live value from RAM to EEPROM is pretty minimal. Use a capacitor to store enough energy to run the micro long enough after power fail is detected to copy the live data into EEPROM, then shut down cleanly. ...

16

Short answer: managers want a simple, testable, PROOF of function before committing to millions (or more) dollars to a design. Current tools, just do not give asynchronous designs those answers. Microcomputers and microcontrollers typically utilize a clocking scheme to insure timing control. All process corners have to maintain timing across all voltage, ...

16

Their terminology is sloppy IMO. In any case: 0x00 - 0x0F are specialized registers 0x10 - 0xFF are memory registers (SRAM) There are only 240 bytes of SRAM. If you need more SRAM than this, you can add more externally via the MBUS.

14

Microchips are made using a very wide variety of process steps. There are basically two main components to each step - masking off areas to operate on, and then performing some operation on those areas. The masking step can be done with several different techniques. The most common is called photolithography. In this process, the wafer is coated with a ...

13

It's really very simple and logical. The PIC 10 has 6 pins, and the PIC 12 has 8 pins. The PIC 16 uses the 14 bit instruction set, except when it uses the 12 bit instruction set, or when the model number is 4 digits starting with 1, then it uses the enhanced 14 bit instruction set. The PIC 18 uses the 16 bit instruction set, and the dsPIC 30 the 24 bit ...

11

Both. And there's quite frequently a team of hundreds involved; the latest Intel flagship processor will probably have had over a thousand people involved in design decisions somewhere (especially if you count technical input from the foundry, which is vital if you're using a new manufacturing process). Generally the process involves: high level ...

11

This smacks of a grounds-not-tied-together issue. It looks like the USB-to-UART device has only 2 lines going to the Pictail board. I would presume those are just the UART Tx and Rx lines, and not ground. If the grounds of all three boards are not tied together, digital signals between the boards will be interpreted incorrectly and will lead to undefined ...

11

Microcontrollers need to use a clock because they need to be able to respond to events that may occur at any time, including nearly simultaneously with either other external events or events generated by the controllers themselves, and will often have multiple circuits that need to know whether one event X precedes another event Y. It may not matter whether ...

11

I'm assuming that you're measuring the voltage with respect to ground, not across the horn terminals. If so, what you are describing sounds like this: Except that the switch is likely a relay, MOSFET, SSR, or some other device that has a non-zero resistance even when "closed". In this case, both wires across the horn will be at the battery voltage when ...

11

I'm sorry this answer won't actually solve your problem. But it is too long to fit in a comment, and it will allow you to rethink your problem in the right way (because as it is, I think it is flawed). This kind of problems have to be solved taking account all components of the system, and making reasonable assumptions on what a potential hacker can or can'...

10

You can use any crystal so long as it is within the frequency range that the PIC crystal driver is specified for. The crystal driver of most PICs (I didn't look up your PIC specifically, that's your job) can be set to three different drive levels, usually called LP (low power), XT (crystal), and HS (high speed). The slower ones use less power but also have ...

10

x is a local variable. It doesn't necessarily even get a storage address. So, you can't necessarily assign an address to it. Make x global. "automatic" is the storage type of a variable, not the data type, so it being int is orthogonal to it being static or automatic. It's a bit surprising your debugger sees an address for the main-local x at all – it'd ...

10

The 120 * 16 is probably just 240 bytes - the 16 indicating a 16-bit wide register.

9

It turns out that there are layers, but people sometimes skip those when talking about how a microchip works. The process that introduces layers is called Back end of line, or BEOL. It basically works like this: Create the 2D chip layer using photolithography Apply an insulating layer Drill holes into that layer Apply a conducting layer, also filling the ...

9

It should be obvious that the main advantage to low-voltage programming is that it can be done with ordinary logic levels, perhaps through gates already connected to the appropriate PIC pins. The disadvantage should also be obvious. If some sequence of ordinary logic levels on a few of the pins can put the device into programming mode, then it is more ...

9

Here is a circuit which will provide a digital input to your microcontroller, and also provides a filtered power supply for your microcontroller. Transients can be nasty on a vehicle's 12V system, with voltages rising as high as 125v for 10 ms during a load dump. This circuit provides protection against negative voltages in addition to the positive spikes ...

9

This is, in my opinion, a confusing usage of the terms max and min. What they're saying is that the minimum voltage you should apply to an input that you want to drive high is 2.4V, but a typical device will read anything down to 1.3V as high--it's just not guaranteed. Likewise, the maximum voltage you should apply when driving a signal low is 0.8V, but ...

9

These chips are used as part of Apple's MFI Certification program. Basically, you have to be a certified developer to sell lightning cables. If you buy a lightning cable from a reseller, you may receive a notification on your iPhone like This accessory is not supported every time you plug in the lightning cable. The pop-up is quite annoying. Your iPhone ...

8

Yes, all microcontrollers have some way to produce voltage signals controlled by the firmware. The brute force method is for the micro to include a digital to analog converter (D/A). The firmware writes a number to the D/A and it produces a voltage proportional to that number. One important spec of D/As is how many bits the number has. This determines ...

8

Assuming you don't exceed the clockrate spec in the silicon, programmed fuses, and application code, you can use any crystal you like. The datasheets will explain which capacitors to use.

8

OTP also usually allows you to buy a programmer and program them yourselves, reducing that 30 day lead time further - to nil, if you keep unprogrammed parts in stock. This allows you to trade the extra device cost against: reduced inventory costs faster time to market - delayed sales can be lost sales. flexibility to deal with unsteady sales And for ...

8

Well let's just ignore the software bloat aspect of computer slow down and look at things on a piece by piece basis. CPU, MoBo, Memory like caches and DRAM: NO, these are clocked systems and the clock is designed to drive the system just fast enough to make sure that the device finishes one task before starting the next (in simplistic terms). These clocks ...

8

The solution to the problem is relatively simple. You accumulate the pulse count to a regular RAM location. Then once each 10 minutes you the copy the current value of the RAM based counter to EEPROM. Using this strategy an EEPROM with a one million cycle count endurance will last about 19 years. For most products this is a good comparison to the expected ...

8

You already are sending integer values over the UART with the code you show. Your problem is apparently sending integers that are more than 8 bits wide. The UART inherently only sends 8 bit bytes (in the most common configuration) at a time. If you want to send a wider integer, you have to send more than one byte to represent that integer. For example, ...

8

It means that the RAM is organised in a structure which is 64K Words wide. The x8 then means that each word is 8 bits. So 32Kx16 would be a RAM which is 32K Words wide, at 16bits per word.

Only top voted, non community-wiki answers of a minimum length are eligible