C Hex Asm pic12f683 programming
5308
£500(approx. $626)
- Posted:
- Proposals: 0
- Remote
- #12737
- Archived
Description
Experience Level: Expert
Project - I have numbered the points that relate to 1 point so that it doesnt get confusing and is easily quote able to reference to.
PIC12F683 is to be used
PIN OUT
1 live 8 ground
2 RD LED 7 RT
3 LD LED 6 LT
4 sync 5 RU LED
pin out is based on what I believe from the pic spec sheet if you feel necessary to change pins 2-7 for a different feature this can be discussed. except pin 4 as this is only a input so I\'m told.
1)
The chip must have 6 modes and 1 pause mode and 1 off mode
2)
Hex files will be used in testing - asm and any other files including mplab will be required after the balance is paid.
3)
The sync button is inverted so when the controller is on the sync button is live it is ground when pressed.
4)
Sync can be pressed in any mode to change to the next mode up resulting in UR LED flashing once for each number of the mode so mode 5 is 5 flashes.
5)
Modes 1-3 - continuous fire while trigger is depressed the trigger is live while pressed and must receive the shortest possible ground signal to produce one shot
the best way i feel to do this is setup a file that
senses live as input
changes to output
sends ground
it may require a delay here for it to recognize the ground signal this needs to be as short as possible so the pin is live most of the time from trigger press(this is very important and will be tested to get the shortest possible millisecond delay) the delay must make it produce the shot only so maybe i can get a asm file where i can edit this delay while testing to get it the shortest possible.
changes to input
delays at set rate to get desired rate per second
senses live and repeat
Doing the above at the start of the project is the best way i feel to start as the asm file will only have a code to test firing and i can set the rate in the asm and mess with the delay to get the desired effect. This being safe that i am not getting all the code.
it should sense live then send ground signals at the set rate per second that has been programmed
6)
Modes 4&5 are my worry to make sure they get the set amount of signal\'s regardless of how long the trigger is depressed. This must be accurate and produce the right number of shots regardless of the state of the trigger the trigger is analogue and goes between 0.3v and 1.2v to produce a shot it must go over 0.4v.
how to
trigger pin input sensing for live
+1 shot from trigger pull add to counter
change from input to output
send ground signal shortest possible delay again
+1 shot add to counter
change to input delay to get the right rate per second.
sense for live
1)if live send ground signal - if its live the trigger is still pressed and at the end of the sequence it should wait for it to go to ground until it restarts so that no matter how long the trigger is held only the set amount of shots is released.
or
2)if ground send live signal - if it is ground it means the trigger was released so when the set amount is fired it should go to sensing live ready to be re used.
1 or 2 = 3rd shot if it is 3 shots this is the end and it goes back to sensing for live
this should be repeated up to the set number of shots
if a live signal is sent it should delay with the live to keep the pin live for the delay not the same as ground !
if ground it should always delay for shortest possible time to create the shot then change to a input and delay the proper time delay there
mode 4&5 will have a set shots per second rate the same as modes 1-4 so that it produces the burst shots at the set rate to. e.g. speed would be 10 sps so 3 shot burst would be done in - 3/10ths a second
7)
Mode 6 - should be a specialist mode set to
FIRERATE2 equ 0x19 ;PRESS
FIRERATE2A equ 0x4B ;RELEASE
this is because one game has a patch and by setting the press to 20 seconds and the release to just below 7 it beats that patch giving 10 sps instead of 7
I also have a full source code for this if more info is required in asm format
8)
Dual triggers - Both triggers must be fully working and producing shots at the same time if pressed at the same time as well as being able to shoot independently where required this is only for modes 1-5
9)
Pause Mode - In any of the modes 1-6 Pressing sync then left trigger within 300 ms pauses the mode and flashes LD then RD LED
10)
Off Mode - This can be done by pressing sync to go past mode 6 it will then go into sleep mode until sync is pressed
So at this point effectively mode 0 - sync pin should be a input sensing for ground everything else should not be doing anything until sync goes to ground when it goes to mode 1
11)
Programming Mode - Pressing Sync button then RT within 300ms enters programming mode
Flashing all 3 led\'s at the same time 3 times
After Flashes Progressing through Programming mode -
It should then be looking for a trigger press Left Trigger Mean\'s Both trigger\'s will be active in that mode, Right Trigger press will mean only the right trigger(pin) Will be active in this mode.
Once one has been pressed the RU LED will flash once for 1 trigger(RT was pressed) or twice for 2 trigger active(LT was pressed)
after the flashes It will flash what current rate it is set to LED LD is 10s LED RD is 1s so 25 is 2 on LED LD and 5 on LED RD (these should be at a good rate for the human eye to see i believe 300ms is good) LD then RD not at same time
After the flashes all 3 LED\'S flash at same time so you know its ready to press triggers for up or down
The program is now expecting LT(DOWN) or RT(UP) presses for every press it will Flash LD LED for LT or RD LED for RT once upon press . At this point the trigger pins will be inputs counting constant live signals showing the trigger has been depressed.
you will then press sync once to confirm your changes
it will then show you the rate that has just been set followed by 3 flashes
then you set 0.1 of a second it will start at 0 and go up to 9 increase and decrease same as before
after set you press sync to confirm flashes 3 led\'s and shows you the rate
then flashes 3 led\'s to confirm it is all setup
and goes back to the mode it was programmed in
modes 4&5 have a extra part instead of 0.1 of a second they have sps rate so the 1st setting is to set what rate per second it fires at like 1-3 then instead of going to 0.1 of a second it counts how many shots that mode should be set to.
After programming a mode it should take immediate effect and be ready to use at the new speed that was just set
12)
when power is lost the pic should re open in the last mode used after the sync button has been pressed to activate it
13)
when sync button goes ground over 300ms the pic should go into sleep mode and wake back up by sync going live again and reloading the last mode used
14)
the chip must save information in the eeprom regarding what modes 1-5 are set to and what mode the chip was last in this should be done on every change of mode saving to the eeprom incase power is lost or it goes into sleep mode the program can recall the last mode used.
15)
There should be a config file for mplab that i can set the base rates for the modes 1-5
before i compile the program
this can also be used in testing to check what it is doing
16)
The project must be completed in a timely manner priority is asap.
The person taking the project must understand that every part of the project needs to work perfectly and be fully completed.
The project information and hardware is available to me to test only i cannot supply it. I am available any time of day or night to test anything that has been programmed and expect you to make sure features work at each point to save time due to hardware not being available but the spec is based on how the hardware works and I am available with volt meter to test anything required on the hardware. There shouldn\'t be any problem as long as it is built to do what the spec says exactly.
PIC12F683 is to be used
PIN OUT
1 live 8 ground
2 RD LED 7 RT
3 LD LED 6 LT
4 sync 5 RU LED
pin out is based on what I believe from the pic spec sheet if you feel necessary to change pins 2-7 for a different feature this can be discussed. except pin 4 as this is only a input so I\'m told.
1)
The chip must have 6 modes and 1 pause mode and 1 off mode
2)
Hex files will be used in testing - asm and any other files including mplab will be required after the balance is paid.
3)
The sync button is inverted so when the controller is on the sync button is live it is ground when pressed.
4)
Sync can be pressed in any mode to change to the next mode up resulting in UR LED flashing once for each number of the mode so mode 5 is 5 flashes.
5)
Modes 1-3 - continuous fire while trigger is depressed the trigger is live while pressed and must receive the shortest possible ground signal to produce one shot
the best way i feel to do this is setup a file that
senses live as input
changes to output
sends ground
it may require a delay here for it to recognize the ground signal this needs to be as short as possible so the pin is live most of the time from trigger press(this is very important and will be tested to get the shortest possible millisecond delay) the delay must make it produce the shot only so maybe i can get a asm file where i can edit this delay while testing to get it the shortest possible.
changes to input
delays at set rate to get desired rate per second
senses live and repeat
Doing the above at the start of the project is the best way i feel to start as the asm file will only have a code to test firing and i can set the rate in the asm and mess with the delay to get the desired effect. This being safe that i am not getting all the code.
it should sense live then send ground signals at the set rate per second that has been programmed
6)
Modes 4&5 are my worry to make sure they get the set amount of signal\'s regardless of how long the trigger is depressed. This must be accurate and produce the right number of shots regardless of the state of the trigger the trigger is analogue and goes between 0.3v and 1.2v to produce a shot it must go over 0.4v.
how to
trigger pin input sensing for live
+1 shot from trigger pull add to counter
change from input to output
send ground signal shortest possible delay again
+1 shot add to counter
change to input delay to get the right rate per second.
sense for live
1)if live send ground signal - if its live the trigger is still pressed and at the end of the sequence it should wait for it to go to ground until it restarts so that no matter how long the trigger is held only the set amount of shots is released.
or
2)if ground send live signal - if it is ground it means the trigger was released so when the set amount is fired it should go to sensing live ready to be re used.
1 or 2 = 3rd shot if it is 3 shots this is the end and it goes back to sensing for live
this should be repeated up to the set number of shots
if a live signal is sent it should delay with the live to keep the pin live for the delay not the same as ground !
if ground it should always delay for shortest possible time to create the shot then change to a input and delay the proper time delay there
mode 4&5 will have a set shots per second rate the same as modes 1-4 so that it produces the burst shots at the set rate to. e.g. speed would be 10 sps so 3 shot burst would be done in - 3/10ths a second
7)
Mode 6 - should be a specialist mode set to
FIRERATE2 equ 0x19 ;PRESS
FIRERATE2A equ 0x4B ;RELEASE
this is because one game has a patch and by setting the press to 20 seconds and the release to just below 7 it beats that patch giving 10 sps instead of 7
I also have a full source code for this if more info is required in asm format
8)
Dual triggers - Both triggers must be fully working and producing shots at the same time if pressed at the same time as well as being able to shoot independently where required this is only for modes 1-5
9)
Pause Mode - In any of the modes 1-6 Pressing sync then left trigger within 300 ms pauses the mode and flashes LD then RD LED
10)
Off Mode - This can be done by pressing sync to go past mode 6 it will then go into sleep mode until sync is pressed
So at this point effectively mode 0 - sync pin should be a input sensing for ground everything else should not be doing anything until sync goes to ground when it goes to mode 1
11)
Programming Mode - Pressing Sync button then RT within 300ms enters programming mode
Flashing all 3 led\'s at the same time 3 times
After Flashes Progressing through Programming mode -
It should then be looking for a trigger press Left Trigger Mean\'s Both trigger\'s will be active in that mode, Right Trigger press will mean only the right trigger(pin) Will be active in this mode.
Once one has been pressed the RU LED will flash once for 1 trigger(RT was pressed) or twice for 2 trigger active(LT was pressed)
after the flashes It will flash what current rate it is set to LED LD is 10s LED RD is 1s so 25 is 2 on LED LD and 5 on LED RD (these should be at a good rate for the human eye to see i believe 300ms is good) LD then RD not at same time
After the flashes all 3 LED\'S flash at same time so you know its ready to press triggers for up or down
The program is now expecting LT(DOWN) or RT(UP) presses for every press it will Flash LD LED for LT or RD LED for RT once upon press . At this point the trigger pins will be inputs counting constant live signals showing the trigger has been depressed.
you will then press sync once to confirm your changes
it will then show you the rate that has just been set followed by 3 flashes
then you set 0.1 of a second it will start at 0 and go up to 9 increase and decrease same as before
after set you press sync to confirm flashes 3 led\'s and shows you the rate
then flashes 3 led\'s to confirm it is all setup
and goes back to the mode it was programmed in
modes 4&5 have a extra part instead of 0.1 of a second they have sps rate so the 1st setting is to set what rate per second it fires at like 1-3 then instead of going to 0.1 of a second it counts how many shots that mode should be set to.
After programming a mode it should take immediate effect and be ready to use at the new speed that was just set
12)
when power is lost the pic should re open in the last mode used after the sync button has been pressed to activate it
13)
when sync button goes ground over 300ms the pic should go into sleep mode and wake back up by sync going live again and reloading the last mode used
14)
the chip must save information in the eeprom regarding what modes 1-5 are set to and what mode the chip was last in this should be done on every change of mode saving to the eeprom incase power is lost or it goes into sleep mode the program can recall the last mode used.
15)
There should be a config file for mplab that i can set the base rates for the modes 1-5
before i compile the program
this can also be used in testing to check what it is doing
16)
The project must be completed in a timely manner priority is asap.
The person taking the project must understand that every part of the project needs to work perfectly and be fully completed.
The project information and hardware is available to me to test only i cannot supply it. I am available any time of day or night to test anything that has been programmed and expect you to make sure features work at each point to save time due to hardware not being available but the spec is based on how the hardware works and I am available with volt meter to test anything required on the hardware. There shouldn\'t be any problem as long as it is built to do what the spec says exactly.
Martin C.
0% (0)Projects Completed
6
Freelancers worked with
2
Projects awarded
18%
Last project
29 May 2014
United Kingdom
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
There are no clarification messages.
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies