Alkex Posted December 27, 2005 Report Posted December 27, 2005 Hi there!I want to make a circuit as copact as possible for a clock and was hoping to use only a (custom miniature design) COre module.I need 4 Douts and 4 Dins and was thinking of the J5 as DOUT or J5 as Din applincations...Is there an easy way to Sub divide J5 into 4 ins and outs? or even better 2 Ains, 2 Dins, and 4 douts?The ultimate plan whould be able to reconfigure these on the fly in the running application ::) !!Any thoughts?A late merry Xmas and best wishes to all !!Alex Quote
TK. Posted December 27, 2005 Report Posted December 27, 2005 Hi Alex,it isn't so difficult to use some pins of J5 as digital input instead of output, the driver can be disabled by setting the appr. flag in the TRISA (port A pins of J5) and TRISE (port E pins of J5). Of course, once you did this, you have to enhance the application. I guess it's enough to include j5_din.inc and j5_dout.inc into one application, and to add all the hooks to the main.asm (search for the hooks in the main.asm files of both applications)Mixed digital pin/analog pin configuration: this is also possible, but not that flexible then choosing input/output behaviour. Search in the PIC18F452 datasheet for "ADCON1" (in the datasheet you will also find the informations about the TRISx registers)Best Regards, Thorsten. Quote
Alkex Posted December 29, 2005 Author Report Posted December 29, 2005 Thanks Thorsten!It's now working great! All the best,Alex Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.