DesignSpark Electrical Logolinkedin
Menu Search
Ask a Question

Re: Calculating loop delays with pic12f509

Good Morning,

I am learning pic programming in assembly language. Baseline PIC's. I have a learning disability which causes me much difficulty grasping things. I am having trouble understanding how to calculate the timing and looping and cycles for lighting an Led on and off at 500 milliseconds delay. With a PIC12F509. Any help and assistance would be more than appreciated.

Regards,

Ray Butterworth   

 

Comments

January 14, 2019 08:12

Thanks Brad, I appreciate your help.
Ray Butterworth

0 Votes

January 3, 2019 08:55

To add to what Boss has said, the 16F84A is about twenty years old. The 16F628A came along about ten years later. It has the same pin ordering as the 16F84A, but has a number of improvements in addition to being lower priced. It has twice as much program space, twice as much EEPROM space, and about three times as much RAM space as the 16F84A. It only needs about 2/3 the power of the 16F84A.
The 16F628A also has a built-in oscillator that needs no external crystal or resistor/capacitor, freeing up one or two pins for additional I/O unless you choose to use an external crystal (which you can still do).
The 16F628A also has additional peripherals built in. These include two more timers, two comparators, a USART for serial communications, and a Capture/Compare/PWM module. The 16F648A is like the 16F628A, but has twice the program storage, for more complex programs.

If you aren't trying to use an existing circuit board layout, I'd consider an even newer PIC like the PIC16(L)F1459. It moves the power and ground pins to one end of the package, instead of the middle. It is also 2.5 times as fast, and has a built-in USB port, a 9 channel 10 bit A/D converter, more PWM, etc., still for less than the 16F84A. And is supported by the PICkit 4.

When Microchip develops a new tool like the PICkit 4, they usually implement support for the most recent chips first, since customers using the older chips usually already have the older tools which support from them.

0 Votes

January 2, 2019 15:02

The 16F84A was replaced by the 16F628 a long time ago. It is not identical (some registers changed) and from memory any multifunction pin defaults to analog in. it uses the 'new' MC programming method so should be compatible with the tools.
The big negative is you will have to convert the example files in the many online sites.

0 Votes