hi guys,
I'm looking for some advice. I'm using a PIC18F452 device and C language.
Basically, I have a 24 bit number that I need to output from the device, I've elected to use the standard I/O ports as I want my device to stand alone - i.e. not using the ascII option to hyperterminal.
I'm guessing the correct thing to do is to convert the binary value into BCD first, then break down the BCD number somehow (arrays) so that they can be put on the various port output lines... the execution of this is bugging me slightly, I'm not so good with C syntax (have been using FPGAs of late, only recently decided to have a go with PICs)
any advice is greatly appreciated.
I'm looking for some advice. I'm using a PIC18F452 device and C language.
Basically, I have a 24 bit number that I need to output from the device, I've elected to use the standard I/O ports as I want my device to stand alone - i.e. not using the ascII option to hyperterminal.
I'm guessing the correct thing to do is to convert the binary value into BCD first, then break down the BCD number somehow (arrays) so that they can be put on the various port output lines... the execution of this is bugging me slightly, I'm not so good with C syntax (have been using FPGAs of late, only recently decided to have a go with PICs)
any advice is greatly appreciated.