A demodulator comprising: a pinned photodiode configured to generate majority and minority carriers in response to an incident modulation signal; at least one storage node (406, 407) configured to store the minority carriers generated by the pinned photodiode; at least one transfer gate (404, 405) connected between the storage node (406, 407) and the pinned photodiode and driven by a demodulation signal for transferring the minority carriers generated by the pinned photodiode towards the storage node (406, 407); the pinned photodiode comprising: an epitaxial semiconductor layer doped with a first dopant (p, n) of a first conductivity type; a semiconductor region doped with a second dopant (n, p) of a second conductivity type, opposite to the first conductivity type, formed within the epitaxial semiconductor layer and creating therewith a lower junction and at least one lateral junction substantially perpendicular to the lower junction; and a pinning layer (401, 501) doped with a third dopant (p+, n+) of the first conductivity type formed on top of said semiconductor region; and a generating unit configured to generate minority and majority carriers at said lateral junction and to form a lateral photodiode, wherein the generating unit comprises at least one first well of the first conductivity type (p, n) formed within the epitaxial semiconductor layer and wherein the at least one transfer gate (404, 405) and storage node (406, 407) are formed within said at least one first well, the first well contacting the semiconductor region, characterised in that the pinning layer (401, 501) is split into at least two separate regions (401a, 401b) spaced apart by an electrical insulating element, each region (401a, 401b) being arranged for being biased independently by a respective biasing signal for creating a gradient of potential within the semiconductor region. a pinned photodiode configured to generate majority and minority carriers in response to an incident modulation signal; at least one storage node (406, 407) configured to store the minority carriers generated by the pinned photodiode; at least one transfer gate (404, 405) connected between the storage node (406, 407) and the pinned photodiode and driven by a demodulation signal for transferring the minority carriers generated by the pinned photodiode towards the storage node (406, 407); the pinned photodiode comprising: an epitaxial semiconductor layer doped with a first dopant (p, n) of a first conductivity type; a semiconductor region doped with a second dopant (n, p) of a second conductivity type, opposite to the first conductivity type, formed within the epitaxial semiconductor layer and creating therewith a lower junction and at least one lateral junction substantially perpendicular to the lower junction; and a pinning layer (401, 501) doped with a third dopant (p+, n+) of the first conductivity type formed on top of said semiconductor region; and a generating unit configured to generate minority and majority carriers at said lateral junction and to form a lateral photodiode, wherein the generating unit comprises at least one first well of the first conductivity type (p, n) formed within the epitaxial semiconductor layer and wherein the at least one transfer gate (404, 405) and storage node (406, 407) are formed within said at least one first well, the first well contacting the semiconductor region, characterised in that the pinning layer (401, 501) is split into at least two separate regions (401a, 401b) spaced apart by an electrical insulating element, each region (401a, 401b) being arranged for being biased independently by a respective biasing signal for creating a gradient of potential within the semiconductor region. an epitaxial semiconductor layer doped with a first dopant (p, n) of a first conductivity type; a semiconductor region doped with a second dopant (n, p) of a second conductivity type, opposite to the first conductivity type, formed within the epitaxial semiconductor layer and creating therewith a lower junction and at least one lateral junction substantially perpendicular to the lower junction; and a pinning layer (401, 501) doped with a third dopant (p+, n+) of the first conductivity type formed on top of said semiconductor region; and a generating unit configured to generate minority and majority carriers at said lateral junction and to form a lateral photodiode, wherein the generating unit comprises at least one first well of the first conductivity type (p, n) formed within the epitaxial semiconductor layer and wherein the at least one transfer gate (404, 405) and storage node (406, 407) are formed within said at least one first well, the first well contacting the semiconductor region, characterised in that the pinning layer (401, 501) is split into at least two separate regions (401a, 401b) spaced apart by an electrical insulating element, each region (401a, 401b) being arranged for being biased independently by a respective biasing signal for creating a gradient of potential within the semiconductor region.