control a preamp with PIC-processor

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
hmm... strange, when i open the .hex file you attached, theres just a few lines:

------------------------------------
:020000040000FA
:1000000085018316031347308100FF308600E130FD
:100010008500831203130630A100FF30A0002920C1
:10002000A00B0F28A10B0D280516861A1A280230DE
:1000300085062920061B212805192128851105156B
:100040002920861B152885191528051185152920B5
:0A00500015288101811F2A280800ED
:02400E00F93B7C
:00000001FF
-------------------------------------
and nothing more... there should be a lot more code should'nt it ?
 
The size of this code is all normal, don't forget that it represents about 44 instructions, and the application is very simple.
Assembly language makes code very short, and now do you understand why Micro$oft makes very bad bad code (WinXP takes about 1,5 Go) ;) ?

Now the good question is: does this code work ?
Have you tried it ?
 
i only get this message when i try to write the chip, the checksum is not correct... 8-(
 

Attachments

  • fault.jpg
    fault.jpg
    29 KB · Views: 352
I think it's programer software that doesn't read correctly the .hex !

The source Main.asm has the config word well defined at 3FF9:

; Main program
; December 8th 2004
; @NETeagle

list p=16f84a
#include "p16f84a.inc"
__config H'3FF9'
...
...

So the programer displays bad word config, but the PIC has the right one !
I have open main.hex with ICProg, and word config is 3FF9.
Try this pic in your application despite this error message.
 
-- breaking news --

Now i have tested the circuit.. there's some problems, when i apply the power it seems like it takes about 30-40seconds before i can get any results from pushing the buttons, the delayed output doesn't output anything and when i push the mute button it seems not to be de-bounced at all...
but the input selecting buttons are working perfectly!

but it might be my programming software doing something strange..?
 
Your program software is OK, the PIC is doing what is written in the main.asm.
So :
- Input button works ok,
- Mute de-bounced button is too fast (that makes the DEL flash),
- the initial tempo is too long.

So I will change the program to reduce the initial tempo (tell me how long ...), and longuer the de-bounced tempo (around 200 ms will be OK).
 
well, there should not be any initial delay except for the output at port A4 where it should go high after the delay, the rest of the circuit ought to startup at once..
the delay is good, maybe just be shortened slightly..

well, the de-bouncing is working perfectly for the two buttons at the input, but not at the mute-button input.

when i push and hold the mute button it starts to flash, so a longer delay there would be sufficient i think..
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.