Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 09, 2020, 11:45:34 11:45


Login with username, password and session length


Pages: [1]
Print
Author Topic: Creating hybrid hex for PIC microcontroller  (Read 851 times)
0 Members and 1 Guest are viewing this topic.
davutnacikaya
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 0
-Receive: 5


« on: April 25, 2020, 02:27:23 14:27 »

Hello, I am sharing the process required to load and run 2 hex files on the same processor. In fact, we create a hybrid hex  Wink PDF can be downloaded from the link:

https://drive.google.com/file/d/1SM9Jb_X7pND7xT8l1uz0ecXdN0g3MUbH/view

Turkish version download link:

https://www.elektroinfo.org/2020/04/pic-iki-hex-yuklemek-birlestirmek.html
« Last Edit: April 25, 2020, 04:24:39 16:24 by davutnacikaya » Logged
Xwing
Active Member
***
Online Online

Posts: 165

Thank You
-Given: 436
-Receive: 1464



« Reply #1 on: April 25, 2020, 03:06:11 15:06 »

Useless and complicated procedure, if i want to run two different tasks on a processor just manage it directly from the code simply with an if on a condition.

P.S.
It is not necessary to change the capacitor for Vusb according to the task, just put one of 220 nF, optimal one 1 uF ceramic.
Logged
davutnacikaya
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 0
-Receive: 5


« Reply #2 on: April 25, 2020, 03:33:32 15:33 »

Useless and complicated procedure, if i want to run two different tasks on a processor just manage it directly from the code simply with an if on a condition.

P.S.
It is not necessary to change the capacitor for Vusb according to the task, just put one of 220 nF, optimal one 1 uF ceramic.

I could not encode due to different USB INC files. So I had to use this method. Also, I don't think the method is useless. I prepared the PDF document to reduce clutter. Only 100mf VUSB capacitor value can be selected.
« Last Edit: April 25, 2020, 03:40:16 15:40 by davutnacikaya » Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 725

Thank You
-Given: 165
-Receive: 1209



« Reply #3 on: April 25, 2020, 04:27:49 16:27 »

Useless and complicated procedure, if i want to run two different tasks on a processor just manage it directly from the code simply with an if on a condition.

P.S.
It is not necessary to change the capacitor for Vusb according to the task, just put one of 220 nF, optimal one 1 uF ceramic.

You can't do that with USB communication, USB stack for HID is different from CDC, so this method will work for this specific situation.

Anything else will just work with a special IF statement
Logged
davutnacikaya
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 0
-Receive: 5


« Reply #4 on: April 25, 2020, 04:33:28 16:33 »

You can't do that with USB communication, USB stack for HID is different from CDC, so this method will work for this specific situation.

Anything else will just work with a special IF statement

Exactly. It works with this method. In fact, it has already turned into a product. USB cdc and USB hid relay controller:


https://www.sedaelektronik.com/index.php?route=product/product&product_id=178

I share the hex code for those who want to make the circuit. Controls portb and portd.

Code:
:020000040000FA
:1010000016EF0CF0056A046EFF0E0426052200D0D0
:10101000D8A01200030E036EE70E02D8F5D7036ABC
:10102000FD0F026EFF0E00D001D00226000000D09E
:1010300000D0D8A00326D8A01200F7D7120C010CBC
:10104000100C010C000C000C000C400C8E0C170C4A
:10105000D90C070C000C000C010C020C000C010C4C
:1010600064106410090C020C290C000C010C010C1A
:10107000040CA00C320C090C040C000C000C020C2B
:10108000030C000C000C000C090C210C000C000CD3
:10109000000C010C220C280C000C070C050C810C18
:1010A000030C400C000C0A0C070C050C010C030C83
:1010B000400C000C0A0C060C000CFF0C090C000C78
:1010C000A10C010C090C010C150C800C250C7F0CDB
:1010D000350C000C450CFF0C750C080C950C080C1D
:1010E000810C020C090C020C150C800C250C7F0CD9
:1010F000350C000C450CFF0C750C080C950C080CFD
:10110000910C020CC00C101118115411B011B41133
:10111000040C030C090C040C1E0C030C730C000CC7
:10112000650C000C640C000C610C000C650C000CD0
:101130006C0C000C650C000C6B0C000C740C000C9F
:10114000720C000C6F0C000C6E0C000C690C000C87
:101150006B0C000C2E0C030C770C000C770C000CA5
:10116000770C000C2E0C000C730C000C650C000CA2
:10117000640C000C610C000C650C000C6C0C000C79
:10118000650C000C6B0C000C740C000C720C000C49
:101190006F0C000C6E0C000C690C000C6B0C000C3E
:1011A0002E0C000C630C000C6F0C000C6D0C000C72
:1011B000020C030C030C030C000C04011E51600B09
:1011C00000083EE1050E1F6303D0040E1A6F36D0EF
:1011D000060E1F6301D035D0080E1F6309D01B0E09
:1011E000126F040E136F010E186F196B1D9326D02A
:1011F000090E1F6301D06AD0000E1F6301D07ED09C
:10120000010E1F6301D09FD0030E1F6301D09BD03E
:101210000A0E1F630BD01C0E126F040E136F2251A7
:101220001227010E186F196B1D9308D00B0E1F6348
:10123000120024EE1CF0225120C4DBFF010E176FB8
:101240001200800E1E631200010E21630FD03C0EAF
:10125000126F100E136F12C4F6FF13C4F7FFF86A73
:101260000800F5CF18F4196B1D83E8D7020E21632F
:1012700012D0640E126F100E136F680EF66E100E01
:10128000F76EF86A0900F5CF18F409000800F5CFE9
:1012900019F41D83D3D7030E21631200F86AF76A8D
:1012A0002045060FF66E110EF7220900F5CF12F455
:1012B0000800F5CF13F412C4F6FF13C4F7FFF86A61
:1012C0000800F5CF18F4196B1D83B8D7010E176FFE
:1012D0002FEE71F00F0EDE6AE82EFDD724EE1CF023
:1012E000010EDE6AE82EFDD720511B6F03E1050ECB
:1012F0001A6F1200060E1A6F02DA12005E6B5F6B35
:101300001E511F0B000803E11DB15E830ED01E515C
:101310001F0B010801E109D01E511F0B020807E154
:1013200034D8DF50040B01E05E81010E176F010E0F
:10133000176312005E0E126F040E136F020E186F09
:10134000196B1D931200010E206309D01E511F0B53
:10135000000805E11D81030E1F631D916FD7000E6C
:10136000206312001E511F0B0208FBE122510F0BDC
:10137000F8E00BD8030E1F6303D0840EDF6E5ED738
:10138000000E22AF880EDF6E59D724EE00F0224502
:101390002235E846E846D9261200000E6C6205D0D8
:1013A00000513C0B340805E00FD0040E6C621200B3
:1013B00014D0000E166F176B186B196BFEDE000E43
:1013C000176378D040D976D0020E1663AED056D8C7
:1013D000C80E00BD880E006F1200040E1A6306D0FE
:1013E00020516E6E050ED8B4030E1A6F010E1663EF
:1013F0009CD005D8C80E04BD880E046F1200185189
:10140000106F1951116F000804E306E118514008EC
:1014100003E2400E106F116B1051056F185F1151F0
:10142000195B0451FC0B1111046F24EE5EF0115195
:1014300002E1105122E01DA312D012C4F6FF13C422
:10144000F7FFF86A0900F5CFDEFF09001007FAE19F
:101450001107F8E2F6CF12F4F7CF13F4120012C41A
:10146000E1FF13C4E2FFE6CFDEFF1007FCE1110746
:10147000FAE2E1CF12F4E2CF13F412000151106F3F
:1014800018270051030B116F192314EE5EF014C4DA
:10149000D9FF15C4DAFF115102E110510AE0E6CF7D
:1014A000DEFF1007FCE11107FAE2D9CF14F4DACF1E
:1014B00015F41200000E17630AD0400E016F1E0EC5
:1014C000026F040E036F840E006F046F2CD01EAFEA
:1014D0001DD01951255D04E307E11851245D04E294
:1014E00024C418F425C419F48ADF010E166F400EC7
:1014F000016F1E0E026F040E036F800E006F5E0EF2
:10150000066F040E076FC80E046F0DD0020E166F23
:10151000056BC80E046F400E016F5E0E026F040E65
:10152000036FC80E006F6D981200000E166F400E0C
:10153000016F1E0E026F040E036F880E006F000E07
:10154000046F12000401140E6F6E1A6B1D6B1B6B7F
:10155000D6D8120004016DA60CD8010E1A63120031
:101560006DBA1200686A696A69806988020E1A6F2A
:1015700012006D6A696A6D86010E1A6F12006D6A3B
:10158000696A1A6B12000401000E1A5D23E068A458
:1015900002D069B424D86DB2120068A002D069B03C
:1015A00038D868A802D069B816D868AC02D069BC2F
:1015B00027D868AA02D069BA25D868A202D069B231
:1015C00026D8030E1A5D06E368A604D069A602D0E9
:1015D000E4DE68961200698468986D8212006D924C
:1015E0006994689412001DA11200F9DF6D84100E39
:1015F000F46EF36AF32EFED7F42EFCD76D9412002E
:10160000689C120070B091DF7090689A1200689226
:1016100012006A6A686A9F0E6B6E7B0E696E6E6A54
:101620002FEE71F00F0EDE6AE82EFDD7160E706EEB
:1016300068B6689668B6FDD76D9877DF1D911B6B0D
:10164000030E1A6F120004011E511F0B010802E164
:10165000000E22631200060E1F6327D0210E2163A5
:101660000FD0880E126F100E136F12C4F6FF13C442
:10167000F7FFF86A0800F5CF18F4196B1D833CD00A
:10168000220E216312D0B60E126F100E136F960E3B
:10169000F66E100EF76EF86A0900F5CF18F409001F
:1016A0000800F5CF19F41D8327D01E51600B2008C8
:1016B000D1E1020E1F6309D09E0E126F040E136F4C
:1016C000010E186F196B1D9317D00A0E1F6303D0FC
:1016D00021C49EF411D0030E1F6309D09F0E126F18
:1016E000040E136F010E186F196B1D9305D00B0EAE
:1016F0001F63120020C49FF4020E176F1200010E28
:10170000E96E16EE00F0400EE66E2FEE70F0E95036
:10171000D9261C0EDF12E944E846E84604EE00F044
:10172000E926020EE1CFEBFF030EE2CFEBFFE5501F
:10173000E92AE7CFEDFF880EEF6E010EE96E15EE98
:1017400010F0400EE66E2FEE70F0E950D9261A0E1A
:10175000DF12E944E846E84604EE04F0E926020E0A
:10176000E1CFEBFF030EE2CFEBFF400EEF6E120076
:10177000066E53D80044E846E84604EE00F0E92639
:10178000E86AD880EFBE1200020EEBCFD9FF030E3D
:10179000EBCFDAFFEC500660066EFF0EDB50ED6E0D
:1017A000065004E0DECFE6FFE82EFCD7400EEF1631
:1017B000EF7C880EEF120650D8901200066E05EEF0
:1017C00011F0E6CFEEFFE82EFCD701D0066E25D84B
:1017D0000AD8D8B007D019D8400EEF16EF7C880E83
:1017E000EF12D89012000044E846E84604EE04F0F8
:1017F000E926E86AD880EFBE1200020EEBCFD9FFCF
:10180000030EEBCFDAFFD8901200FF0EDB5006601C
:10181000066EE92A0650ED6E1200E0CF03F09ADE64
:10182000B2DE1AC402F003C0E0FF1200F86A8ADEDA
:101830000001AB6AF19E926A936A020E946E956AF9
:10184000806A816A826A836A6F886F846988698422
:10185000010E6B6EA088689468986A98A198C80E6B
:1018600002EC08F082B22DD10ED9AAEC0AF0C3EC3A
:101870000AF0E86A68B8010E076EE86A6AB8010EF5
:101880000710076EE86AA1B8010E0710076EE86A34
:1018900068B4010E0710076EE86A68B0010E071001
:1018A000D8A4FF00010E006E10EE08F0080E86DFCF
:1018B000010E006E10EE08F0080E5ADFD6E2AAEC18
:1018C0000AF0C3EC0AF00B50016E010E015CD8B4B3
:1018D00081800B50016E020E015CD8B481820B50E6
:1018E000016E030E015CD8B481840B50016E040EAE
:1018F000015CD8B481860B50016E050E015CD8B432
:1019000081880B50016E060E015CD8B4818A0B50A1
:10191000016E070E015CD8B4818C0B50016E080E6D
:10192000015CD8B4818E0B50016E110E015CD8B4ED
:1019300081900B50016E120E015CD8B481920B5055
:10194000016E130E015CD8B481940B50016E140E1D
:10195000015CD8B481960B50016E150E015CD8B4B1
:1019600081980B50016E160E015CD8B4819A0B5011
:10197000016E170E015CD8B4819C0B50016E180EDD
:10198000015CD8B4819E0B50016E090E015CD8B485
:1019900083800B50016E0A0E015CD8B483820B5019
:1019A000016E0B0E015CD8B483840B50016E0C0EDB
:1019B000015CD8B483860B50016E0D0E015CD8B467
:1019C00083880B50016E0E0E015CD8B4838A0B50D5
:1019D000016E0F0E015CD8B4838C0B50016E100E9B
:1019E000015CD8B4838E0B50016E190E015CD8B423
:1019F00083900B50016E1A0E015CD8B483920B5089
:101A0000016E1B0E015CD8B483940B50016E1C0E4A
:101A1000015CD8B483960B50016E1D0E015CD8B4E6
:101A200083980B50016E1E0E015CD8B4839A0B5044
:101A3000016E1F0E015CD8B4839C0B50016E200E0A
:101A4000015CD8B4839E0B50016EFE0E015CD8B4CD
:101A5000816A0B50016EFE0E015CD8B4836A0B5094
:101A6000016E0128D8B481680B50016E0128D8B4EA
:101A700083686D84030E02EC08F06D94AAEC0AF002
:101A8000C3EC0AF0F2D6E86A68B8010E076EE86A9D
:101A90006AB8010E0710076EE86AA1B8010E0710B8
:101AA000076EE86A68B4010E0710076EE86A68B04E
:101AB000010E0710D8A4FF00B0DE060E025CFCE1A8
:021AC000120012
:020000040030CA
:08000000E4FEFFEEFFFD9BFF93
:020000040000FA
:10250000C3EF16F0016A800E116E87EF12F0096AB0
:102510000A6A0B6A0C6A029ACAEC12F0D30FD8B49A
:10252000028A2D0FC60FF8E20A0FF6E3076E066A5D
:10253000056A046A0A0E036EE9EC12F007500324E0
:10254000096E04500A6E000ED8B0010E0A2605501E
:102550000B6E000ED8B0010E0B2606500C6E000E4E
:10256000D8B0010E0C26010606E0CAEC12F0C60F28
:1025700002E20A0FDBE202AA0BD0091E0A1E0B1EA2
:102580000C1E092AD8B40A2AD8B40B2AD8B40C2AAB
:102590000950120011BEEE501200086A076EFF0EBD
:1025A0000726082200D0D8A01200030E046EE70E02
:1025B00002D8F5D7046AFD0F036EFF0E00D001D0DC
:1025C0000326000000D000D0D8A00426D8A0120016
:1025D000F7D7200E006E0D6A0E6A0F6A106AD89047
:1025E00003A00ED009500D260A50D8B00A3C0E2682
:1025F0000B50D8B00B3C0F260C50D8B00C3C10261A
:1026000010320F320E320D320632053204320332EE
:10261000002EE5D71200120C010C100C010C020C5C
:10262000000C000C080CD80C040C0A0C000C000C5C
:10263000000C010C020C000C010C3E263E26090C7D
:10264000020C430C000C020C010C020C800C500C10
:10265000090C040C000C000C010C020C020C010C07
:10266000000C050C240C000C100C010C040C240CA8
:10267000020C020C050C240C060C000C010C050CC1
:10268000240C010C000C010C070C050C820C030C33
:10269000080C000C020C090C040C010C000C020CC0
:1026A0000A0C000C000C000C070C050C030C020CAF
:1026B000400C000C000C070C050C830C020C400CA9
:1026C000000C000CCE26D626FE2636275227040CF8
:1026D000030C090C040C140C030C4D0C000C690CBD
:1026E000000C630C000C720C000C6F0C000C630CE3
:1026F000000C680C000C690C000C700C000C1C0C1D
:10270000030C500C000C490C000C430C000C310C59
:10271000000C380C000C200C000C550C000C530C59
:10272000000C420C000C200C000C430C000C440C60
:10273000000C430C000C0E0C030C560C000C310C5E
:10274000000C2E0C000C310C000C460C000C530C31
:10275000000C0A0C030C430C000C660C000C670CFC
:10276000000C310C000C04012E51600B00083EE1FE
:10277000050E2F6303D0040E2A6F36D0060E2F638A
:1027800001D035D0080E2F6309D02B0E226F040E16
:10279000236F010E286F296B2D9326D0090E2F630E
:1027A00001D06AD0000E2F6301D07ED0010E2F63BE
:1027B00001D09FD0030E2F6301D09BD00A0E2F6350
:1027C0000BD02C0E226F040E236F32512227010EE4
:1027D000286F296B2D9308D00B0E2F63120024EE67
:1027E0002CF0325130C4DBFF010E276F1200800E37
:1027F0002E631200010E31630FD0160E226F260ECB
:10280000236F22C4F6FF23C4F7FFF86A0800F5CF50
:1028100028F4296B2D83E8D7020E316312D03E0EC7
:10282000226F260E236F420EF66E260EF76EF86AA2
:102830000900F5CF28F409000800F5CF29F42D830D
:10284000D3D7030E31631200F86AF76A3045C40F1C
:10285000F66E260EF7220900F5CF22F40800F5CF18
:1028600023F422C4F6FF23C4F7FFF86A0800F5CF6B
:1028700028F4296B2D83B8D7010E276F2FEE71F046
:102880000F0EDE6AE82EFDD724EE2CF0010EDE6A74
:10289000E82EFDD730512B6F03E1050E2A6F120091
:1028A000060E2A6F01DA1200366B376B2E511F0BA2
:1028B000000803E12DB136830ED02E511F0B010805
:1028C00001E109D02E511F0B020807E134D8DF5077
:1028D000040B01E03681010E276F010E2763120001
:1028E000360E226F040E236F020E286F296B2D9374
:1028F0001200010E306309D02E511F0B000805E1B4
:102900002D81030E2F632D916FD7000E30631200BF
:102910002E511F0B0208FBE132510F0BF8E00BD8D0
:10292000030E2F6303D0840EDF6E5ED7000E32AF2E
:10293000880EDF6E59D724EE00F032453235E84676
:10294000E846D9261200000E6C6205D000513C0BFF
:10295000340805E00FD0040E6C62120014D0000E93
:10296000266F276B286B296BFEDE000E276378D05D
:1029700040D976D0020E2663AED056D8C80E00BD20
:10298000880E006F1200040E2A6306D030516E6E5E
:10299000050ED8B4030E2A6F010E26639CD005D80D
:1029A000C80E04BD880E046F12002851206F2951F3
:1029B000216F000804E306E12851080803E2080E2D
:1029C000206F216B2051056F285F2151295B045135
:1029D000FC0B2111046F24EE36F0215102E120514D
:1029E00022E02DA312D022C4F6FF23C4F7FFF86A19
:1029F0000900F5CFDEFF09002007FAE12107F8E220
:102A0000F6CF22F4F7CF23F4120022C4E1FF23C44F
:102A1000E2FFE6CFDEFF2007FCE12107FAE2E1CF8B
:102A200022F4E2CF23F412000151206F2827005135
:102A3000030B216F292314EE36F024C4D9FF25C4DB
:102A4000DAFF215102E120510AE0E6CFDEFF200744
:102A5000FCE12107FAE2D9CF24F4DACF25F4120001
:102A6000000E27630AD0080E016F2E0E026F040EAF
:102A7000036F840E006F046F2CD02EAF1DD0295130
:102A8000355D04E307E12851345D04E234C428F4E1
:102A900035C429F48ADF010E266F080E016F2E0E51
:102AA000026F040E036F800E006F360E066F040E69
:102AB000076FC80E046F0DD0020E266F056BC80E8F
:102AC000046F080E016F360E026F040E036FC80EFE
:102AD000006F6D981200000E266F080E016F2E0E0B
:102AE000026F040E036F880E006F000E046F120059
:102AF0000401140E6F6E2A6B2D6B2B6BD5D8120050
:102B000004016DA60CD8010E2A6312006DBA1200E2
:102B1000686A696A69806988020E2A6F12006D6AA4
:102B2000696A6D86010E2A6F12006D6A696A2A6BE6
:102B300012000401000E2A5D23E068A402D069B4EB
:102B400024D86DB2120068A002D069B038D868A845
:102B500002D069B816D868AC02D069BC27D868AA78
:102B600002D069BA25D868A202D069B226D8030E6D
:102B70002A5D06E368A604D069A602D0E4DE689662
:102B80001200698468986D8212006D92699468944D
:102B900012002DA11200F9DF6D84100EF46EF36A9D
:102BA000F32EFED7F42EFCD76D941200689C120011
:102BB00070B091DF7090689A1200689212006A6A91
:102BC000686A9F0E6B6E7B0E696E6E6A2FEE71F0F7
:102BD0000F0EDE6AE82EFDD7160E706E68B6689688
:102BE00068B6FDD76D9877DF2D912B6B030E2A6F9A
:102BF000120004012E511F0B010809E12E51600B38
:102C0000200805E1000E325D03E0010E3263120080
:102C1000000E2F6309D0460E226F040E236F2D93F2
:102C2000080E286F296B3DD0010E2F6305D0460E8C
:102C3000246F040E256F35D0020E2F6301D01200D1
:102C4000030E2F6301D01200040E2F6301D0120077
:102C5000200E2F6305D03E0E246F040E256F21D069
:102C6000210E2F6313D03E6BC20E3F6F010E406FDB
:102C7000416B426B436B080E446F3E0E226F040E95
:102C8000236F2D93070E286F296B0BD0220E2F6315
:102C900003D030C445F405D0230E2F6301D01200B9
:102CA0001200030E276F1200020EE96E15EE00F0FF
:102CB000080E23D8030EE96E16EE00F0400EE66E05
:102CC0002FEE70F0E950D9261C0EDF12E944E846D9
:102CD000E84604EE00F0E926020EE1CFEBFF030E1A
:102CE000E2CFEBFFE550E92AE7CFEDFF880EEF6E6C
:102CF000030EE96E15EE10F0400EE66E2FEE70F04A
:102D0000E950D9261A0EDF12E944E846E84604EEF7
:102D100004F0E926020EE1CFEBFF030EE2CFEBFF5A
:102D2000400EEF6E1200800E096E24D80044E84673
:102D3000E84604EE00F0E926E86AD880EFBE12000B
:102D4000020EEBCFD9FF030EEBCFDAFFEC50096098
:102D5000096EFF0EDB50ED6E095004E0DECFE6FF9A
:102D6000E82EFCD7400EEF16EF7C880EEF120950CC
:102D7000D8901200E0CF04F0C3DEDBDE2AC403F0FB
:102D800004C0E0FF1200F86AB3DE0001AB6A926A89
:102D9000936A946A956A806A816A826A836A070E76
:102DA000B46E0F0EC16EE6DF060E035CFCE1030E8F
:102DB000006E10EE3DF0B7DFFAE2010ECDEC12F03E
:102DC000D9DF00EE3DF082EC12F0526E00EE3DF0E5
:102DD000150EEE6AE82EFDD7010E525C09E18180E6
:102DE000C9DF00EE3DF0150EEE6AE82EFDD78CD15E
:102DF000020E525C09E18182BDDF00EE3DF0150E4E
:102E0000EE6AE82EFDD780D1030E525C09E1818481
:102E1000B1DF00EE3DF0150EEE6AE82EFDD774D15D
:102E2000040E525C09E18186A5DF00EE3DF0150E2F
:102E3000EE6AE82EFDD768D1050E525C09E1818863
:102E400099DF00EE3DF0150EEE6AE82EFDD75CD15D
:102E5000060E525C09E1818A8DDF00EE3DF0150E11
:102E6000EE6AE82EFDD750D1070E525C09E1818C45
:102E700081DF00EE3DF0150EEE6AE82EFDD744D15D
:102E8000080E525C09E1818E75DF00EE3DF0150EF3
:102E9000EE6AE82EFDD738D1090E525C09E1838035
:102EA00069DF00EE3DF0150EEE6AE82EFDD72CD15D
:102EB0000A0E525C09E183825DDF00EE3DF0150EE3
:102EC000EE6AE82EFDD720D10B0E525C09E1838417
:102ED00051DF00EE3DF0150EEE6AE82EFDD714D15D
:102EE0000C0E525C09E1838645DF00EE3DF0150EC5
:102EF000EE6AE82EFDD708D10D0E525C09E18388F9
:102F000039DF00EE3DF0150EEE6AE82EFDD7FCD05D
:102F10000E0E525C09E1838A2DDF00EE3DF0150EA6
:102F2000EE6AE82EFDD7F0D00F0E525C09E1838CDB
:102F300021DF00EE3DF0150EEE6AE82EFDD7E4D05D
:102F4000100E525C09E1838E15DF00EE3DF0150E88
:102F5000EE6AE82EFDD7D8D0110E525C09E18190BF
:102F600009DF00EE3DF0150EEE6AE82EFDD7CCD05D
:102F7000120E525C09E18192FDDE00EE3DF0150E6D
:102F8000EE6AE82EFDD7C0D0130E525C09E18194A1
:102F9000F1DE00EE3DF0150EEE6AE82EFDD7B4D05E
:102FA000140E525C09E18196E5DE00EE3DF0150E4F
:102FB000EE6AE82EFDD7A8D0150E525C09E1819883
:102FC000D9DE00EE3DF0150EEE6AE82EFDD79CD05E
:102FD000160E525C09E1819ACDDE00EE3DF0150E31
:102FE000EE6AE82EFDD790D0170E525C09E1819C65
:102FF000C1DE00EE3DF0150EEE6AE82EFDD784D05E
:10300000180E525C09E1819EB5DE00EE3DF0150E12
:10301000EE6AE82EFDD778D0190E525C09E1839054
:10302000A9DE00EE3DF0150EEE6AE82EFDD76CD05D
:103030001A0E525C09E183929DDE00EE3DF0150E02
:10304000EE6AE82EFDD760D01B0E525C09E1839436
:1030500091DE00EE3DF0150EEE6AE82EFDD754D05D
:103060001C0E525C09E1839685DE00EE3DF0150EE4
:10307000EE6AE82EFDD748D01D0E525C09E1839818
:1030800079DE00EE3DF0150EEE6AE82EFDD73CD05D
:103090001E0E525C09E1839A6DDE00EE3DF0150EC6
:1030A000EE6AE82EFDD730D01F0E525C09E1839CFA
:1030B00061DE00EE3DF0150EEE6AE82EFDD724D05D
:1030C000200E525C09E1839E55DE00EE3DF0150EA8
:1030D000EE6AE82EFDD718D0FE0E525C0AE1816A36
:1030E000836A48DE00EE3DF0150EEE6AE82EFDD74D
:1030F0000BD0522809E1816883683CDE00EE3DF088
:0E310000150EEE6AE82EFDD752D60300FED75C
:020000040030CA
:08000000E4FEFFEEFFFD9BFF93
:00000001FF

« Last Edit: April 25, 2020, 04:45:40 16:45 by davutnacikaya » Logged
madhan7710
Junior Member
**
Offline Offline

Posts: 64

Thank You
-Given: 36
-Receive: 133


« Reply #5 on: April 25, 2020, 06:58:34 18:58 »

What if both the hex needs to use one or more same interrupts and which interrupt routine will get executed? As ahmad said may be useful for this specific project but i doubt this method will work for other projects. Still this method is something new which i believe most of us have never thinked this way...
Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 725

Thank You
-Given: 165
-Receive: 1209



« Reply #6 on: April 25, 2020, 08:25:02 20:25 »

What if both the hex needs to use one or more same interrupts and which interrupt routine will get executed? As ahmad said may be useful for this specific project but i doubt this method will work for other projects. Still this method is something new which i believe most of us have never thinked this way...

Correct. As you can see he is using proton (very limited usb stack), you can use USB stack in either poll or interrupt mode.
Logged
Xwing
Active Member
***
Online Online

Posts: 165

Thank You
-Given: 436
-Receive: 1464



« Reply #7 on: April 25, 2020, 09:04:27 21:04 »

You can't do that with USB communication, USB stack for HID is different from CDC, so this method will work for this specific situation.

Obviously the USB operation is different depending on the case, but this does not prevent the creation of the various modes in the code to be changed according to how it is needed.
Note that a processor reset is not required to change the USB connection, it can be done at runtime after disconnecting from the host.
Logged
lm317
Junior Member
**
Offline Offline

Posts: 81

Thank You
-Given: 98
-Receive: 26


« Reply #8 on: April 26, 2020, 05:47:14 17:47 »

Firmware can decide to which stack used.  
So jumper or button not needed.  

PIC runs as HID  for 5 hours and firmware decided thats enough. Store the flag to eeprom. And restart via watchdog. After reestart runs as CDC.

Or user can select mode from PC. flags stored again.

Better way USB composite device with 2 interface.
1 device always HID. This device used for mode select. Another HID or CDC
« Last Edit: April 26, 2020, 05:50:30 17:50 by lm317 » Logged
Ahmad_k
SCG Moderator
Hero Member
*****
Offline Offline

Posts: 725

Thank You
-Given: 165
-Receive: 1209



« Reply #9 on: April 26, 2020, 06:00:52 18:00 »

Firmware can decide to which stack used. 
So jumper or button not needed. 

PIC runs as HID  for 5 hours and firmware decided thats enough. Store the flag to eeprom. And restart via watchdog. After reestart runs as CDC.

Or user can select mode from PC. flags stored again.

Better way USB composite device with 2 interface.
1 device always HID. This device used for mode select. Another HID or CDC

Just read my post again, he is using "PROTON". you cannot include two stacks in your project without a big modification. It is way more simple if you use XC8 or XC16 compiler
Logged
davutnacikaya
Inactive

Offline Offline

Posts: 4

Thank You
-Given: 0
-Receive: 5


« Reply #10 on: April 30, 2020, 10:23:45 22:23 »

I updated the PDF document. Added address correction that causes Hex2 not to work. Notes 3 - Page 3-4

https://drive.google.com/file/d/1SM9Jb_X7pND7xT8l1uz0ecXdN0g3MUbH/view
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC