Artificial neural network(ANN) implement on PIC microC

Status
Not open for further replies.

kay1010

Newbie level 3
Joined
May 19, 2010
Messages
3
Helped
3
Reputation
6
Reaction score
2
Trophy points
1,283
Location
Malaysia
Activity points
1,305
Hi All,

I am working on a project which need to make the PIC microcontroller acts like an ANN. I decided to choose the PIC18F452. The ANN (backpropagation/Multi-Layer Perceptron) was train first using MATLAB. After that, the input and output weights obtained from the MATLAB will be used in the microcontroller. However, since there is not enough RAM in PIC18F452, I choose the external SRAM CY62256LL-70PXC to store the input and output weights of the ANN.

The MATLAB part has finished and I've problem with the microcontroller part since I know very little about the PIC. So, does anyone know or have a source code for PIC that will make the microcontroller act like ANN, in other words, the source code of ANN structure? Plus, how to store the input and output weights which is in matrix array in the SRAM? If anyone has the code, that would help me a lot.
I have with me MPLAB IDE v8.40.
Thank you in advance.
 

well. i don't know if somebody already did something like this....

any way... how many inputs and outputs are you using? and how many inner layers? in other words, how many weights do you have? even if you get to fill all of those in an external memory, you will need a huge processor to calculate all the outputs...

remember, a simple pic, works with 8 bit best, even it can't multiply directly... (hope your weights are 8 bit data)
 
Reactions: urvish

    urvish

    Points: 2
    Helpful Answer Positive Rating
In fact, I have two ANNs structures. One is for classification which have 1056 data and estimation 1056 data too. The input neurons for both is 66. The hidden neurons for classification is 16 whereas the for estimation is 5. The output neurons for classification is 6 and for estimation is 1. Can you explain to me what do you mean by "hope your weights are 8 bit data"?
 
Reactions: urvish

    urvish

    Points: 2
    Helpful Answer Positive Rating
the pic18f452 has only 32 digital inputs/outputs, all the core is 8 bit, so adding, substracting and multiplying is done with 8 bit data, (integer from -128 to +127 or unsigned integer from 0 to 255) of course you can implement (or use a high-level-language) 32-bit integer or real (with decimals) numbers... but it'll take too much space (and processing time) in that simple pic...

according your data, I suggest using something more advanced that a PIC18f452
 

Yes, my friend thought the same thing too. He suggested that PIC32 is more appropriate for my project considering that the ANNs' structures will involve a lot of calculations.
 
Reactions: urvish

    urvish

    Points: 2
    Helpful Answer Positive Rating
    V

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…