![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
Hello everybody. I have a simple problem, Please help me out. The code snap goes this way store_temp ;a defined variable count_8 ; a counter variable to sit the bits of store_temp as desired ;************************ molw D'7' movwf count_8 loop bsf store_temp, count_8 ;setting bit one by one incf count_8 decfsz count_8, 1 goto loop end ;******************** The problem is the bsf is executed only once. Next cycle no bit is set in store_temp and the loop goes on Thanks. | |
| |
| | #2 |
|
I get this Code: Warning[202] D:\DOCS\DOCS\ASM\TIMER.ASM 81 : Argument out of range. Least significant bits used. Last edited by mabauti; 27th March 2009 at 06:41 AM. | |
| |
| | #3 |
|
What are you trying to do in this instruction: bsf store_temp, count_8 ;setting bit one by one You are incf and then decf the same file (register) What do you want to do? After "goto loop" you should have a few instructions that output a bit to a LED to show the program has actually reached the end of what you are trying to do. | |
| |
| | #4 | ||
|
I would say he is wanting to compare store_temp to count. But the code don't make any since Quote:
Quote:
Last edited by be80be; 27th March 2009 at 08:41 AM. | |||
| |
|
| Tags |
| bsf, loop, pic16f84 |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| loop time out | homemade24 | Micro Controllers | 3 | 12th February 2009 02:33 PM |
| Ac Loop Oscillator | magnetman12003 | Electronic Projects Design/Ideas/Reviews | 1 | 29th March 2008 10:33 PM |
| Can PIC16F84 replaced by PIC16F877A with the same configurations in PIC16F84?? | chunei | Micro Controllers | 6 | 3rd September 2007 10:57 PM |
| help in vhdl for loop | abilash | Electronic Projects Design/Ideas/Reviews | 2 | 8th April 2007 08:54 AM |
| FOR loop in C | eblc1388 | Micro Controllers | 12 | 10th January 2007 11:24 PM |